mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 02:23:06 +08:00
13 lines
281 B
JavaScript
13 lines
281 B
JavaScript
const Action = {
|
|
|
|
// This will load the user for the specific action. We'll limit this to the
|
|
// admin users only.
|
|
user({user_id}, _, {loaders, user}) {
|
|
if (user.hasRole('ADMIN')) {
|
|
return loaders.Users.getByID.load(user_id);
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = Action;
|