const express = require('express'); const jwt = require('jsonwebtoken'); const bcrypt = require('bcryptjs'); const { check, validationResult } = require('express-validator'); const router = express.Router(); // User Model const User = require('./models/User'); // Register Route for Studio Owners router.post( '/register', [ check('email', 'Please include a valid email').isEmail(), check('password', 'Password is required').exists(), ], async (req, res) => { const errors = validationResult(req); if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }); } const { email, password, role } = req.body; try { let user = await User.findOne({ email }); if (user) { return res.status(400).json({ msg: 'User already exists' }); } user = new User({ email, password, role, // "Studio Owner", "Judge", etc. }); // Hash password before saving const salt = await bcrypt.genSalt(10); user.password = await bcrypt.hash(password, salt); await user.save(); // Generate JWT Token const payload = { user: { id: user.id, role: user.role, }, }; jwt.sign( payload, process.env.JWT_SECRET, { expiresIn: 3600 }, (err, token) => { if (err) throw err; res.json({ token }); } ); } catch (err) { console.error(err.message); res.status(500).send('Server error'); } } ); module.exports = router;
top of page

MUSIC

Music needs to be uploaded in an MP3 form on registration or send it directly to dancenationutah@gmail.comIf for any reason you do not upload it onto your registration form,  music must be uploaded 14 days prior to competition.  Please bring a backup copy of your music, for your own security, on the day of the competition!

 

*Please make sure that your music is appropriate for a  family friendly competition without offensive language or content.

​

Solo/Duo/Trio Time Limit

1:15-2:45

​

Group Routine Time Limit

1:30-3:00

​

Production Time Limit

4:00-15:00

​

*Penalties/deductions may be applied at the discretion of the judges if any routine exceeds time limits.

bottom of page