fix: accept optional lat/lng body in ticket resolve endpoint
This commit is contained in:
@@ -117,7 +117,7 @@ export class TicketService {
|
||||
});
|
||||
}
|
||||
|
||||
async resolve(tenantId: string, id: string, resolvedById: string) {
|
||||
async resolve(tenantId: string, id: string, resolvedById: string, body?: { latitude?: number; longitude?: number }) {
|
||||
const db = this.prisma.forTenant(tenantId);
|
||||
const ticket = await db.ticket.findFirst({ where: { id } });
|
||||
|
||||
@@ -139,6 +139,8 @@ export class TicketService {
|
||||
status: 'resolved',
|
||||
resolvedAt: new Date(),
|
||||
assigneeId: resolvedById,
|
||||
...(body?.latitude !== undefined && { latitude: body.latitude }),
|
||||
...(body?.longitude !== undefined && { longitude: body.longitude }),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user