Add a way to submit splash texts
This commit is contained in:
16
src/index.ts
16
src/index.ts
@@ -46,6 +46,7 @@ import { handler as berryDashAccountSavePostHandler } from './routes/berrydash/a
|
||||
import { handler as berryDashChatroomReportPostHandler } from './routes/berrydash/chatroom/report/post'
|
||||
|
||||
import { handler as berryDashSplashTextGetHandler } from './routes/berrydash/splash-text/get'
|
||||
import { handler as berryDashSplashTextPostHandler } from './routes/berrydash/splash-text/post'
|
||||
|
||||
dotenv.config({ quiet: true })
|
||||
|
||||
@@ -958,6 +959,21 @@ app.get('/berrydash/splash-text', berryDashSplashTextGetHandler, {
|
||||
tags: ['Berry Dash', 'Splash Texts']
|
||||
}
|
||||
})
|
||||
app.post('/berrydash/splash-text', berryDashSplashTextPostHandler, {
|
||||
detail: {
|
||||
description: 'The endpoint for submitting splash texts.',
|
||||
tags: ['Berry Dash', 'Splash Texts']
|
||||
},
|
||||
body: t.Object({
|
||||
token: t.String(),
|
||||
content: t.String()
|
||||
}),
|
||||
headers: t.Object({
|
||||
authorization: t.String({
|
||||
description: 'This is your session token'
|
||||
})
|
||||
})
|
||||
})
|
||||
app.all('*', () =>
|
||||
jsonResponse(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user