fix(api-server): fix swagger

This commit is contained in:
JellyBrick
2024-12-27 01:43:03 +09:00
parent 748d77d1c0
commit f8a53f0d61
2 changed files with 0 additions and 18 deletions

View File

@ -6,7 +6,6 @@ import getSongControls from '@/providers/song-controls';
import {
AddSongToQueueSchema,
AuthHeadersSchema,
GoBackSchema,
GoForwardScheme,
MoveSongInQueueSchema,
@ -116,7 +115,6 @@ const routes = {
summary: 'seek',
description: 'Seek to a specific time in the current song',
request: {
headers: AuthHeadersSchema,
body: {
description: 'seconds to seek to',
content: {
@ -138,7 +136,6 @@ const routes = {
summary: 'go back',
description: 'Move the current song back by a number of seconds',
request: {
headers: AuthHeadersSchema,
body: {
description: 'seconds to go back',
content: {
@ -161,7 +158,6 @@ const routes = {
summary: 'go forward',
description: 'Move the current song forward by a number of seconds',
request: {
headers: AuthHeadersSchema,
body: {
description: 'seconds to go forward',
content: {
@ -213,7 +209,6 @@ const routes = {
summary: 'switch repeat',
description: 'Switch the repeat mode',
request: {
headers: AuthHeadersSchema,
body: {
description: 'number of times to click the repeat button',
content: {
@ -235,7 +230,6 @@ const routes = {
summary: 'set volume',
description: 'Set the volume of the player',
request: {
headers: AuthHeadersSchema,
body: {
description: 'volume to set',
content: {
@ -257,7 +251,6 @@ const routes = {
summary: 'set fullscreen',
description: 'Set the fullscreen state of the player',
request: {
headers: AuthHeadersSchema,
body: {
description: 'fullscreen state',
content: {
@ -387,7 +380,6 @@ const routes = {
summary: 'add song to queue',
description: 'Add a song to the queue',
request: {
headers: AuthHeadersSchema,
body: {
description: 'video id of the song to add',
content: {
@ -409,7 +401,6 @@ const routes = {
summary: 'move song in queue',
description: 'Move a song in the queue',
request: {
headers: AuthHeadersSchema,
params: QueueParamsSchema,
body: {
description: 'index to move the song to',
@ -432,7 +423,6 @@ const routes = {
summary: 'remove song from queue',
description: 'Remove a song from the queue',
request: {
headers: AuthHeadersSchema,
params: QueueParamsSchema,
},
responses: {
@ -447,7 +437,6 @@ const routes = {
summary: 'set queue index',
description: 'Set the current index of the queue',
request: {
headers: AuthHeadersSchema,
body: {
description: 'index to move the song to',
content: {
@ -480,7 +469,6 @@ const routes = {
summary: 'search for a song',
description: 'search for a song',
request: {
headers: AuthHeadersSchema,
body: {
description: 'search query',
content: {

View File

@ -1,11 +1,5 @@
import { z } from '@hono/zod-openapi';
export const AuthHeadersSchema = z.object({
authorization: z.string().openapi({
example: 'Bearer token',
}),
});
export type JWTPayload = z.infer<typeof JWTPayloadSchema>;
export const JWTPayloadSchema = z.object({
id: z.string(),