Browse Source

added create-user script

main
deicidus 1 year ago
parent
commit
04e79c6279
  1. 2
      routes/register.js

2
routes/register.js

@ -9,7 +9,7 @@ router.post('/register', (req, res) => {
return res.status(400).json({ error: 'Username and password are required' });
}
execSync(`create-user ${username} ${password}`, (error, stdout, stderr) => {
execSync(`./scripts/create-user ${username} ${password}`, (error, stdout, stderr) => {
if (error) {
console.log('errer')
if (error.message.includes('already exists')) {

Loading…
Cancel
Save