mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 09:35:02 +00:00
Update backend/src/data/ApiLogins.ts
Combine early return statements Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
parent
b74c6ac2a5
commit
cd42cfa546
1 changed files with 1 additions and 4 deletions
|
@ -94,10 +94,7 @@ export class ApiLogins extends BaseRepository {
|
|||
|
||||
const login = await this.apiLogins.createQueryBuilder().where("id = :id", { id: loginId }).getOne();
|
||||
|
||||
if (!login) return;
|
||||
|
||||
if (moment.utc(login.expires_at).isSameOrAfter(updatedTime)) return;
|
||||
|
||||
if (!login || moment.utc(login.expires_at).isSameOrAfter(updatedTime)) return;
|
||||
await this.apiLogins.update(
|
||||
{ id: loginId },
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue