1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-08 07:00:04 +00:00

test(client): new route /client + specs added

This commit is contained in:
Saad Jutt
2021-11-03 01:35:52 +05:00
parent d7337ce456
commit d6aeb378de
9 changed files with 201 additions and 30 deletions

View File

@@ -1,11 +1,11 @@
import express from 'express'
import { createUser } from '../../controllers/createUser'
import { registerValidation } from '../../utils'
import { registerUserValidation } from '../../utils'
const userRouter = express.Router()
userRouter.post('/', async (req, res) => {
const { error, value: data } = registerValidation(req.body)
const { error, value: data } = registerUserValidation(req.body)
if (error) return res.status(400).send(error.details[0].message)
try {