Skip to content

Instantly share code, notes, and snippets.

@bradtaniguchi
Forked from cloudjas/User Request
Last active January 19, 2018 21:25
Show Gist options
  • Save bradtaniguchi/169890df5a69cc3a21a75dbf62513f68 to your computer and use it in GitHub Desktop.
Save bradtaniguchi/169890df5a69cc3a21a75dbf62513f68 to your computer and use it in GitHub Desktop.
Current Body:
{
"userId" : "abc545646545646546545"
}
Option I - Proposal:
[
{
"userId" : "abc545646545646546545"
},
{
"userId" : "abc545646545646546545"
},
{
"userId" : "abc545646545646546545"
}
]
Option II - More simple solution (I Guess)
{
users: 'abc545646545646546545, abc54564654564648966, kkj123132132132121'
}
Option III - Grouped by role
{
message: 'message to send in the email',
roles: [
{
roleId: 'abc545646545646546545',
users: [
abc545646545646546545,
abc54564654564648966,
kkj123132132132121
]
},
{
roleId: 'abc545646545646546545',
users: [
abc545646545646546545,
abc54564654564648966,
kkj123132132132121
]
}
]
}
Option IV - Grouped by role (key: value version)
This has just as as much information, but is smaller and harder to iterate over.
{
message: 'message to send in the email',
roles: {
'role123457890': [
abc545646545646546545,
abc54564654564648966,
kkj123132132132121
],
'role123457891': [
abc545646545646546545,
abc54564654564648966,
kkj123132132132121
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment