Fix bug when generating code
This commit is contained in:
parent
67ce409ffa
commit
431b885ef7
3 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ export default async function handler(
|
|||
res: NextApiResponse
|
||||
) {
|
||||
const { body, method } = req;
|
||||
if (method?.toUpperCase() === "POST") {
|
||||
if (method === "POST") {
|
||||
let validatedClan;
|
||||
try {
|
||||
validatedClan = await SubmitClanSchema.validate(body, {
|
||||
|
@ -36,7 +36,7 @@ export default async function handler(
|
|||
const currentcode = serverClan.code;
|
||||
|
||||
// Encrypt code lole
|
||||
serverClan.code = await hash(serverClan.code).toString();
|
||||
serverClan.code = (await hash(serverClan.code)).toString();
|
||||
|
||||
if (
|
||||
serverClan.flairs != null &&
|
||||
|
|
|
@ -11,7 +11,7 @@ export default async function handler(
|
|||
res: NextApiResponse
|
||||
) {
|
||||
const { body, method, cookies, query } = req;
|
||||
if (method?.toUpperCase() === "POST") {
|
||||
if (method === "POST") {
|
||||
let validatedMessage;
|
||||
try {
|
||||
validatedMessage = await SubmitMessageSchema.validate(body, {
|
||||
|
|
|
@ -11,7 +11,7 @@ export default async function handler(
|
|||
res: NextApiResponse
|
||||
) {
|
||||
const { body, method, cookies } = req;
|
||||
if (method?.toUpperCase() === "POST") {
|
||||
if (method === "POST") {
|
||||
let validatedTroll;
|
||||
try {
|
||||
validatedTroll = await SubmitTrollSchema.validate(body, {
|
||||
|
|
Loading…
Reference in a new issue