You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user.service.js 414B

1234567891011121314151617
  1. import { db } from '../utils/db.js'
  2. /**
  3. * Signup a new user
  4. * @returns {User} instantiated User (see: /entites/user)
  5. */
  6. const signupUser = async user => {
  7. const payload = {
  8. user_name: user.name,
  9. user_email: user.email,
  10. user_pass: user.password,
  11. is_poster: user.seeking === 'position' ? 0 : 1,
  12. }
  13. return await db.post('/user/signup', payload)
  14. }
  15. export { signupUser }