feat(api): add tags to event and user routes for better categorization
All checks were successful
container-scan / Container Scan (pull_request) Successful in 2m48s
docker-build / docker (pull_request) Successful in 6m39s

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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