Add a way to submit splash texts

This commit is contained in:
2026-01-30 21:35:43 -07:00
parent cb8c171dcf
commit a85ee726c9
2 changed files with 136 additions and 0 deletions

View File

@@ -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(
{