Update getAll() method to include relations.
This commit is contained in:
parent
0331042b8b
commit
b68935a11e
@ -12,7 +12,11 @@ class TasksService {
|
|||||||
public async getAll() {
|
public async getAll() {
|
||||||
logger.info("Fetching all task records...");
|
logger.info("Fetching all task records...");
|
||||||
try {
|
try {
|
||||||
const result = await this.db.query.tasks.findMany();
|
const result = await this.db.query.tasks.findMany({
|
||||||
|
with: {
|
||||||
|
type: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
logger.debug(`Found ${result.length} records.`);
|
logger.debug(`Found ${result.length} records.`);
|
||||||
return result;
|
return result;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user