Skip to content

Instantly share code, notes, and snippets.

@isaidspaghetti
Created August 14, 2020 21:29
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/758c053f0f553ed2e8c23ea8f29acf7f to your computer and use it in GitHub Desktop.
Save isaidspaghetti/758c053f0f553ed2e8c23ea8f29acf7f to your computer and use it in GitHub Desktop.
//backend/routes/index.js:11
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