Don't specify Nightbot headers in the endpoint and prevent GET requests
This commit is contained in:
parent
70e1b46f4c
commit
f8d9145431
1 changed files with 1 additions and 3 deletions
|
|
@ -1,19 +1,17 @@
|
|||
import { channelNameSchema, counterNameSchema } from "$/schemas/params";
|
||||
import { nightbotCustomHeadersSchema } from "$/schemas/nightbot";
|
||||
import { config, database } from "$/main";
|
||||
import { ServerRoute } from "@hapi/hapi";
|
||||
import boom from "@hapi/boom";
|
||||
import Joi from "joi";
|
||||
|
||||
const route: ServerRoute = {
|
||||
method: [ `GET`, `PATCH` ], path: `/channels/{channel}/counters/{counter}`,
|
||||
method: `PATCH`, path: `/channels/{channel}/counters/{counter}`,
|
||||
options: {
|
||||
validate: {
|
||||
params: Joi.object({
|
||||
channel: channelNameSchema,
|
||||
counter: counterNameSchema,
|
||||
}),
|
||||
headers: nightbotCustomHeadersSchema.unknown(),
|
||||
query: Joi.object({
|
||||
delta: Joi.number().integer().required(),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue