Skip to content
Snippets Groups Projects
Commit 0b211f20 authored by hyunzzii's avatar hyunzzii
Browse files

feat: signup controller

parent d303a5e7
No related branches found
No related tags found
1 merge request!1Hyunzzi setting router, controller, service for signup
Pipeline #8578 failed
const signupService = require('../services/signupService');
exports.registerUser = async (req,res)=>{
try {
const userData = req.body;
const response = await signupService.registerUser(userData);
res.status(201).json(response);
}catch(err){
console.log(err);
res.status(500);
}
}
exports.isIdDuplicates = async(req,res)=>{
try{
const userId = req.params.id;
const response = await signupService.isIdDuplicates(userId);
res.status(200).json(response);
}catch(err){
console.log(err);
res.status(500);
}
}
exports.isNicknameDuplicates = async(req,res)=>{
try{
const nickname = req.params.nickname;
const response = await signupService.isNicknameDuplicates(nickname);
res.status(200).json(response);
}catch(err){
console.log(err);
res.status(500);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment