daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Mar 20th, 2017 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import BaseController from './basecontroller';
  2.  
  3. class Users extends BaseController {
  4.     create({ body, session, generate_password, models }) {
  5.         let created_user = models.users.create({
  6.             name: body.name,
  7.             email: body.email,
  8.             phone: body.phone,
  9.             password: generate_password(),
  10.             created_by: session.auth_user.id
  11.         });
  12.         return {
  13.             output: { user_id: created_user.id },
  14.             event_data: { id: created_user.id }
  15.         }
  16.     }
  17. }
  18.  
  19. export default new Users;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top