feat(api): add tags to event and user routes for better categorization

This commit is contained in:
Dominik 2025-06-16 11:09:43 +02:00
parent 1c99368238
commit 60c99e0650
Signed by: dominik
GPG key ID: 06A4003FC5049644
8 changed files with 28 additions and 1 deletions

View file

@ -3,6 +3,7 @@ services:
build:
context: .
dockerfile: Dockerfile
network: host
image: git.dominikstahl.dev/dhbw-we/meetup:main
ports:
- '3000:3000'

View file

@ -8,6 +8,8 @@ import { NextResponse } from 'next/server';
* get:
* summary: Get a specific participant's details in an event
* description: Returns the details of a specific participant in an event.
* tags:
* - Event_Participant
* parameters:
* - in: path
* name: eventID
@ -150,6 +152,8 @@ export const GET = auth(async (req, { params }) => {
* delete:
* summary: Remove a participant from an event
* description: Removes a participant from an event. Only the organizer can remove participants.
* tags:
* - Event_Participant
* parameters:
* - in: path
* name: eventID
@ -282,6 +286,8 @@ export const DELETE = auth(async (req, { params }) => {
* patch:
* summary: Update a participant's status in an event
* description: Updates the status of a participant in an event. Only the participant can update their own status.
* tags:
* - Event_Participant
* parameters:
* - in: path
* name: eventID

View file

@ -8,6 +8,8 @@ import { NextResponse } from 'next/server';
* get:
* summary: Get participants of an event
* description: Returns all participants of a specific event.
* tags:
* - Event_Participant
* parameters:
* - in: path
* name: eventID
@ -135,6 +137,8 @@ export const GET = auth(async (req, { params }) => {
* post:
* summary: Add a participant to an event
* description: Adds a user as a participant to a specific event.
* tags:
* - Event_Participant
* parameters:
* - in: path
* name: eventID

View file

@ -8,6 +8,8 @@ import { NextResponse } from 'next/server';
* get:
* summary: Get details of a specific event
* description: Returns the details of an event by its ID.
* tags:
* - Event
* parameters:
* - in: path
* name: eventID
@ -125,6 +127,8 @@ export const GET = auth(async (req, { params }) => {
* delete:
* summary: Delete a specific event
* description: Deletes an event by its ID if the user is the organizer.
* tags:
* - Event
* parameters:
* - in: path
* name: eventID
@ -234,6 +238,8 @@ export const DELETE = auth(async (req, { params }) => {
* patch:
* summary: Update a specific event
* description: Updates an event by its ID if the user is the organizer.
* tags:
* - Event
* parameters:
* - in: path
* name: eventID

View file

@ -8,6 +8,8 @@ import { NextResponse } from 'next/server';
* get:
* summary: Get all events for the authenticated user
* description: Returns all events where the user is an organizer or a participant.
* tags:
* - Event
* responses:
* 200:
* description: List of events for the user.
@ -110,6 +112,8 @@ export const GET = auth(async (req) => {
* post:
* summary: Create a new event
* description: Creates a new event as the authenticated user (organizer).
* tags:
* - Event
* requestBody:
* required: true
* content:

View file

@ -8,6 +8,8 @@ import { prisma } from '@/prisma';
* get:
* summary: Get user information by ID or name
* description: Retrieve the information of a specific user by ID or name.
* tags:
* - User
* parameters:
* - in: path
* name: user

View file

@ -15,6 +15,8 @@ import {
* get:
* summary: Get the currently authenticated user's information
* description: Retrieve the information of the currently authenticated user.
* tags:
* - User
* responses:
* 200:
* description: User information retrieved successfully.
@ -89,6 +91,8 @@ export const GET = auth(async function GET(req) {
* patch:
* summary: Update the currently authenticated user's information
* description: Update the information of the currently authenticated user.
* tags:
* - User
* requestBody:
* required: true
* content:

View file

@ -2,7 +2,7 @@
import { RedirectButton } from '@/components/user/redirect-button';
import { ThemePicker } from '@/components/user/theme-picker';
import { useGetApiUserMe } from '@/generated/api/default/default';
import { useGetApiUserMe } from '@/generated/api/user/user';
export default function Home() {
const { data, isLoading } = useGetApiUserMe();