Update getAll() method to include relations.
This commit is contained in:
parent
0331042b8b
commit
b68935a11e
@ -12,7 +12,11 @@ class TasksService {
|
||||
public async getAll() {
|
||||
logger.info("Fetching all task records...");
|
||||
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.`);
|
||||
return result;
|
||||
} catch (e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user