Last adjustments for the gym_id problem on backend side
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
c84cbd240d
commit
924d16a1a4
|
@ -201,10 +201,7 @@ climbingRoutesRouter.post('/', async (req: Request, res: Response) => {
|
|||
let captcha_token = req.query['hcaptcha_response'] as string;
|
||||
|
||||
if (isNaN(gym_id) || !name || !difficulty || !captcha_token) {
|
||||
res.status(400).send({
|
||||
'message': 'Missing parameters',
|
||||
'query_params': req.query
|
||||
});
|
||||
res.status(400).send({'message': 'Missing parameters'});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import * as dotenv from 'dotenv';
|
||||
import * as querystring from 'querystring';
|
||||
import * as querystring from 'qs';
|
||||
import axios from 'axios';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
export const verifyCaptcha = async (captcha_token: string): Promise<boolean> => {
|
||||
var postData = querystring.stringify({
|
||||
let postData = querystring.stringify({
|
||||
response: captcha_token,
|
||||
secret: process.env.HCAPTCHA_SECRET
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user