axios problems
This commit is contained in:
@@ -57,7 +57,7 @@ export const authRoute = (app: Express, passport: PassportStatic) => {
|
||||
|
||||
router.post('/register', async (req, res, next) => {
|
||||
try {
|
||||
const data: IUser = req.body;
|
||||
const data = req.body;
|
||||
const response = await AuthInstance.register(data);
|
||||
if (!response) res.status(400).send({ ok: false });
|
||||
res.status(200).send({ ok: true });
|
||||
|
||||
@@ -30,6 +30,8 @@ export const collectionRoute = (app: Express) => {
|
||||
|
||||
router.post('/', restrictAccess, async (req, res, next) => {
|
||||
const data = req.body;
|
||||
console.log(data);
|
||||
|
||||
try {
|
||||
const result = await CollectionInstance.post(data);
|
||||
res.status(result.code).send(result.data);
|
||||
|
||||
Reference in New Issue
Block a user