2022-08-15 18:07:39 -05:00
|
|
|
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({
|
2025-07-22 13:50:49 -05:00
|
|
|
async 'change.userPass' (usersId, password) {
|
2023-06-09 13:38:10 -05:00
|
|
|
check(usersId, String);
|
|
|
|
|
check(password, String);
|
|
|
|
|
|
2025-07-22 13:50:49 -05:00
|
|
|
return await Accounts.setPasswordAsync(usersId, password);
|
2023-06-09 13:38:10 -05:00
|
|
|
},
|
2022-08-15 18:07:39 -05:00
|
|
|
});
|