import { Announcement, AnnouncementResponse } from './types'

const processAnnouncement = (data: AnnouncementResponse): Announcement => ({
    ...data,
    lat: data.latitude,
    lng: data.longtitude,
    bestBy: data.best_by,
    bookedBy: data.booked_by,
    userId: data.user_id,
})

export { processAnnouncement }
