From f22bdfff7d1f894547c76047b7bdd86cc58aa6a6 Mon Sep 17 00:00:00 2001 From: lesion Date: Mon, 23 May 2022 14:45:14 +0200 Subject: [PATCH] minor --- pages/event/_slug.vue | 2 +- server/api/index.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/event/_slug.vue b/pages/event/_slug.vue index 14fae710..00042eee 100644 --- a/pages/event/_slug.vue +++ b/pages/event/_slug.vue @@ -36,7 +36,7 @@ v-container#event.pa-0.pa-sm-2 //- tags, hashtags v-card-text(v-if='event.tags.length') v-chip.p-category.ml-1.mt-3(v-for='tag in event.tags' color='primary' - outlined :key='tag') + outlined :key='tag' :to='`/tag/${tag}`') span(v-text='tag') //- info & actions diff --git a/server/api/index.js b/server/api/index.js index 421c2d6e..3bcd96a5 100644 --- a/server/api/index.js +++ b/server/api/index.js @@ -23,6 +23,7 @@ if (config.status !== 'READY') { const { isAuth, isAdmin } = require('./auth') const eventController = require('./controller/event') + const placeController = require('./controller/place') const settingsController = require('./controller/settings') const exportController = require('./controller/export') const userController = require('./controller/user') @@ -121,6 +122,8 @@ if (config.status !== 'READY') { // allow anyone to add an event (anon event has to be confirmed, TODO: flood protection) api.post('/event', eventController.isAnonEventAllowed, upload.single('image'), eventController.add) + api.get('/event/search', eventController.search) + api.put('/event', isAuth, upload.single('image'), eventController.update) api.get('/event/import', isAuth, helpers.importURL) @@ -151,6 +154,10 @@ if (config.status !== 'READY') { // export events (rss/ics) api.get('/export/:type', cors, exportController.export) + + api.get('/place/:placeName/events', cors, placeController.getEvents) + + // - FEDIVERSE INSTANCES, MODERATION, RESOURCES api.get('/instances', isAdmin, instanceController.getAll) api.get('/instances/:instance_domain', isAdmin, instanceController.get) api.post('/instances/toggle_block', isAdmin, instanceController.toggleBlock)