transform POST methods to uppercase for fixing
This commit is contained in:
parent
b3547b6f0d
commit
67ce409ffa
3 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ export default async function handler(
|
||||||
res: NextApiResponse
|
res: NextApiResponse
|
||||||
) {
|
) {
|
||||||
const { body, method } = req;
|
const { body, method } = req;
|
||||||
if (method === "POST") {
|
if (method?.toUpperCase() === "POST") {
|
||||||
let validatedClan;
|
let validatedClan;
|
||||||
try {
|
try {
|
||||||
validatedClan = await SubmitClanSchema.validate(body, {
|
validatedClan = await SubmitClanSchema.validate(body, {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default async function handler(
|
||||||
res: NextApiResponse
|
res: NextApiResponse
|
||||||
) {
|
) {
|
||||||
const { body, method, cookies, query } = req;
|
const { body, method, cookies, query } = req;
|
||||||
if (method === "POST") {
|
if (method?.toUpperCase() === "POST") {
|
||||||
let validatedMessage;
|
let validatedMessage;
|
||||||
try {
|
try {
|
||||||
validatedMessage = await SubmitMessageSchema.validate(body, {
|
validatedMessage = await SubmitMessageSchema.validate(body, {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default async function handler(
|
||||||
res: NextApiResponse
|
res: NextApiResponse
|
||||||
) {
|
) {
|
||||||
const { body, method, cookies } = req;
|
const { body, method, cookies } = req;
|
||||||
if (method === "POST") {
|
if (method?.toUpperCase() === "POST") {
|
||||||
let validatedTroll;
|
let validatedTroll;
|
||||||
try {
|
try {
|
||||||
validatedTroll = await SubmitTrollSchema.validate(body, {
|
validatedTroll = await SubmitTrollSchema.validate(body, {
|
||||||
|
|
Loading…
Reference in a new issue