mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Move every InvitationCodes.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
49071ca5fd
commit
76aae41637
3 changed files with 55 additions and 5 deletions
|
|
@ -249,7 +249,7 @@ if (Meteor.isServer) {
|
|||
}
|
||||
|
||||
function sendInvitationEmail(_id) {
|
||||
const icode = InvitationCodes.findOne(_id);
|
||||
const icode = ReactiveCache.getInvitationCode(_id);
|
||||
const author = ReactiveCache.getCurrentUser();
|
||||
try {
|
||||
const fullName = ReactiveCache.getUser(icode.authorId)?.profile?.fullname || "";
|
||||
|
|
@ -358,7 +358,7 @@ if (Meteor.isServer) {
|
|||
);
|
||||
}
|
||||
// Checks if the email is already link to an invitation.
|
||||
const invitation = InvitationCodes.findOne({ email });
|
||||
const invitation = ReactiveCache.getInvitationCode({ email });
|
||||
if (invitation) {
|
||||
InvitationCodes.update(invitation, {
|
||||
$set: { boardsToBeInvited: boards },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue