From 10c6b0d24243c24860c14e36837c813e30465068 Mon Sep 17 00:00:00 2001 From: lesion Date: Fri, 11 Mar 2022 23:18:57 +0100 Subject: [PATCH] sort locales --- locales/esm.js | 12 ++++++------ server/api/index.js | 24 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/locales/esm.js b/locales/esm.js index 144769fd..7de4cd35 100644 --- a/locales/esm.js +++ b/locales/esm.js @@ -1,12 +1,12 @@ export default { - it: 'Italiano', + ca: 'Català', + de: 'Deutsch', en: 'English', es: 'Español', - ca: 'Català', - pl: 'Polski', eu: 'Euskara', - nb: 'Norwegian Bokmål', fr: 'Francais', - de: 'Deutsch', - gl: 'Galego' + gl: 'Galego', + it: 'Italiano', + nb: 'Norwegian Bokmål', + pl: 'Polski', } diff --git a/server/api/index.js b/server/api/index.js index 1ad30dfe..b1111710 100644 --- a/server/api/index.js +++ b/server/api/index.js @@ -80,10 +80,28 @@ if (config.status !== 'READY') { // update a place (modify address..) api.put('/place', isAdmin, eventController.updatePlace) + /** + * Get events + * @category Event + * @name /api/events + * @type GET + * @param {integer} [start] - start timestamp (default: now) + * @param {integer} [end] - end timestamp (optional) + * @param {array} [tags] - List of tags + * @param {array} [places] - List of places + * @param {integer} [max] - Max events + * @param {boolean} [show_recurrent] - Show also recurrent events (default: as choosen in admin settings) + * @example ***Example*** + * [https://demo.gancio.org/api/events](https://demo.gancio.org/api/events) + * [usage example](https://framagit.org/les/gancio/-/blob/master/webcomponents/src/GancioEvents.svelte#L18-42) + */ + + api.get('/events', cors, eventController.select) + /** * Add a new event * @category Event - * @name /event + * @name /api/event * @type POST * @info `Content-Type` has to be `multipart/form-data` to support image upload * @param {string} title - event's title @@ -95,7 +113,6 @@ if (config.status !== 'READY') { * @param {array} tags - List of tags * @param {object} [recurrent] - Recurrent event details * @param {string} [recurrent.frequency] - could be `1w` or `2w` - * @param {string} [recurrent.type] - not used * @param {array} [recurrent.days] - array of days * @param {image} [image] - Image */ @@ -133,9 +150,6 @@ if (config.status !== 'READY') { // export events (rss/ics) api.get('/export/:type', cors, exportController.export) - // get events in this range - api.get('/events', cors, eventController.select) - api.get('/instances', isAdmin, instanceController.getAll) api.get('/instances/:instance_domain', isAdmin, instanceController.get) api.post('/instances/toggle_block', isAdmin, instanceController.toggleBlock)