mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
21 lines
No EOL
544 B
JavaScript
21 lines
No EOL
544 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
import { Mongo } from 'meteor/mongo';
|
|
import { check } from 'meteor/check';
|
|
|
|
export const UserConfigOptions = new Mongo.Collection('userConfigOptions');
|
|
|
|
UserConfigOptions.allow({
|
|
insert: function(userId, doc){
|
|
// if use id exists, allow insert
|
|
return !!userId;
|
|
},
|
|
});
|
|
|
|
Meteor.methods({
|
|
async 'change.userPass' (usersId, password) {
|
|
check(usersId, String);
|
|
check(password, String);
|
|
|
|
return await Accounts.setPasswordAsync(usersId, password);
|
|
},
|
|
}); |