Skip to content

Instantly share code, notes, and snippets.

@isaidspaghetti
Last active July 27, 2020 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaidspaghetti/f52f81d86037fdfae957d6ac9466a40d to your computer and use it in GitHub Desktop.
Save isaidspaghetti/f52f81d86037fdfae957d6ac9466a40d to your computer and use it in GitHub Desktop.
Index createUsers
//backend/routes/index.js:30
function createUsers(firstName, lastName) {
const customer = {
id: `${firstName}-${lastName}`.toLowerCase(),
name: firstName,
role: 'user',
};
const admin = {
id: 'admin-id',
name: 'Support Admin',
role: 'admin'
};
return [customer, admin];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment