b310-digital/teammapper

Add createdAt date time to maps

Closed this issue · 0 comments

Proposed feature
We want to show the last maps on the start page with the time at which they were created. However, when a map is created in the backend, the response includes a ServerMap object which includes the following data:

export interface IMmpClientMap {
  uuid: string
  lastModified: Date
  deleteAfterDays: number
  deletedAt: Date
  data: IMmpClientNode[]
  options: IMmpClientMapOptions
}

This should be enhanced by the created time of the server map. However, I don't think this field is currently available in the database.

  • Create a new createdAtfield in the database for the map table
  • Export the createdAt field on map creation in the endpoint
  •  Add the new field to the frontend types and save the field in the storage service within prepareNewMap call from map-sync Service