0
0
Fork 0

Improve data validation for channel names

This commit is contained in:
Oliver-Akins 2023-02-20 19:57:37 -07:00
parent adf3cdf771
commit 29e7e2a297
5 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,4 @@
import { channelSchema } from "$/schemas/general";
import { config, database } from "$/main";
import { ServerRoute } from "@hapi/hapi";
import Joi from "joi";
@ -7,7 +8,7 @@ const route: ServerRoute = {
options: {
validate: {
params: Joi.object({
channel: Joi.string().alphanum(),
channel: channelSchema,
}),
},
},