📝 Format error messages for Challonge OAuth configuration consistently

This commit is contained in:
2026-01-29 04:35:19 +00:00
parent 8650920c7c
commit 0cc01aa476

View File

@@ -55,9 +55,10 @@ app.use('/api/gamemaster', gamemasterRouter);
*/
app.post('/oauth/token', async (req, res) => {
if (!hasChallongeAuth) {
return res.status(503).json({
return res.status(503).json({
error: 'Challonge OAuth not configured',
message: 'Set CHALLONGE_CLIENT_ID and CHALLONGE_CLIENT_SECRET environment variables'
message:
'Set CHALLONGE_CLIENT_ID and CHALLONGE_CLIENT_SECRET environment variables'
});
}
@@ -106,9 +107,10 @@ app.post('/oauth/token', async (req, res) => {
*/
app.post('/oauth/refresh', async (req, res) => {
if (!hasChallongeAuth) {
return res.status(503).json({
return res.status(503).json({
error: 'Challonge OAuth not configured',
message: 'Set CHALLONGE_CLIENT_ID and CHALLONGE_CLIENT_SECRET environment variables'
message:
'Set CHALLONGE_CLIENT_ID and CHALLONGE_CLIENT_SECRET environment variables'
});
}