salix/modules/account/back/methods/role-inherit/sync.js

15 lines
326 B
JavaScript

module.exports = Self => {
Self.remoteMethod('sync', {
description: 'Synchronizes the user with the other user databases',
http: {
path: `/sync`,
verb: 'PATCH'
}
});
Self.sync = async function() {
await Self.app.models.AccountConfig.syncRoles();
};
};