Fix bug where some fields were not sent back via the api
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2023-05-15 20:50:50 +02:00
parent 76e6bbdbbf
commit 34a4a6664f
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE

View File

@ -15,7 +15,7 @@ export const getAllEvents = async (calendarId: number): Promise<Event[]> => {
let eventRows: Event[] = []; let eventRows: Event[] = [];
try { try {
const eventsQuery = ` const eventsQuery = `
SELECT e.calendar_id, u.full_name, v.* FROM events e SELECT e.calendar_id, e.uuid, e.created_date, e.created_by_id, u.full_name, v.* FROM events e
INNER JOIN ( INNER JOIN (
SELECT event_id, MAX(event_version_id) AS latest_version SELECT event_id, MAX(event_version_id) AS latest_version
FROM event_versions FROM event_versions
@ -61,7 +61,7 @@ export const getAllEventsAdmin = async (calendarId: number): Promise<Event[]> =>
let eventRows: Event[] = []; let eventRows: Event[] = [];
try { try {
const eventsQuery = ` const eventsQuery = `
SELECT e.calendar_id, u.full_name, v.* FROM events e SELECT e.calendar_id, e.uuid, e.created_date, e.created_by_id, u.full_name, v.* FROM events e
INNER JOIN ( INNER JOIN (
SELECT event_id, MAX(event_version_id) AS latest_version SELECT event_id, MAX(event_version_id) AS latest_version
FROM event_versions FROM event_versions