mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat: optimize db queries (#297)
This commit is contained in:
parent
fd28daa37a
commit
dd57a52ab6
5 changed files with 104 additions and 33 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { SelectQueryBuilder } from "typeorm";
|
||||
import { JobService } from "@apricote/nest-pg-boss";
|
||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
||||
import { IImportSpotifyJob, ImportSpotifyJob } from "../sources/jobs";
|
||||
|
|
@ -65,4 +66,8 @@ export class UsersService {
|
|||
user.spotify = spotify;
|
||||
await this.userRepository.save(user);
|
||||
}
|
||||
|
||||
getQueryBuilder(): SelectQueryBuilder<User> {
|
||||
return this.userRepository.createQueryBuilder("user");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue