mirror of
https://github.com/wekan/wekan.git
synced 2026-02-16 21:18:06 +01:00
Migrate wekan-ldap to async API for Meteor 3.0
- Replace Meteor.wrapAsync with native Promises - Convert all sync methods to async - Use async DB operations (findOneAsync, updateAsync) - Bump version 0.0.2 → 0.1.0
This commit is contained in:
parent
eb0c9ac1e6
commit
7d56dca80b
6 changed files with 102 additions and 83 deletions
|
|
@ -2,7 +2,7 @@ import {importNewUsers} from './sync';
|
|||
import LDAP from './ldap';
|
||||
|
||||
Meteor.methods({
|
||||
ldap_sync_now() {
|
||||
async ldap_sync_now() {
|
||||
const user = Meteor.user();
|
||||
if (!user) {
|
||||
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'ldap_sync_users' });
|
||||
|
|
@ -18,7 +18,7 @@ Meteor.methods({
|
|||
|
||||
this.unblock();
|
||||
|
||||
importNewUsers();
|
||||
await importNewUsers();
|
||||
|
||||
return {
|
||||
message: 'Sync_in_progress',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue