Skip to content

Commit

Permalink
Merge pull request #678 from Peter253545/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleClapton authored Jul 18, 2023
2 parents fa33d16 + a04246e commit 32b9156
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/classes/Anope.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ class Anope {

account.user = await User.findOne({
where: {
email: { iLike: account.email, status: 'active' },
email: { iLike: account.email },
status: 'active',
},
})
return account
Expand Down Expand Up @@ -265,7 +266,8 @@ class Anope {

account.user = await User.findOne({
where: {
email: { iLike: account.email, status: 'active' },
email: { iLike: account.email },
status: 'active',
},
})
return account
Expand Down
7 changes: 6 additions & 1 deletion src/db/Rat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ export default class Rat extends Model {
through: {
attributes: [],
},
}],
}, {
model: models.Ship.scope(undefined),
as: 'ships',
required: false,
}
],
}],
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Rats.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default class Rats extends APIResource {
*/
isSelf ({ ctx, entity }) {
if (entity.userId === ctx.state.user.id) {
return Permission.granted({ permissions: ['rat.write.me'], connection: ctx })
return Permission.granted({ permissions: ['rats.write.me'], connection: ctx })
}
return false
}
Expand Down

0 comments on commit 32b9156

Please sign in to comment.