feat: user export service. bug and UX fixes. Complete minus outstanding email template fixes.
This commit is contained in:
@@ -384,4 +384,12 @@ export class MaintenanceRepository {
|
||||
);
|
||||
return result.rows[0] ? this.mapMaintenanceSchedule(result.rows[0]) : null;
|
||||
}
|
||||
|
||||
async findSchedulesByUserId(userId: string): Promise<MaintenanceSchedule[]> {
|
||||
const res = await this.db.query(
|
||||
`SELECT * FROM maintenance_schedules WHERE user_id = $1 ORDER BY created_at DESC`,
|
||||
[userId]
|
||||
);
|
||||
return res.rows.map(row => this.mapMaintenanceSchedule(row));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user