compostage-dans-ma-ville / backend

0 stars 0 forks source link

GET /sites #11

Closed Lyokolux closed 1 year ago

Lyokolux commented 1 year ago

Description

A list of sites can be retrieved.

DoD

Lyokolux commented 1 year ago

Il semble préférable de séparer la pagination des liens en deux classes.

Pagination:

class Pagination {
  pageNumber: number
  pageSize: number
  totalCount: number
}

Links:

class Links {
  prev?: string
  next?: string
  last: string
  first: string
}

data type returned by the API for a collection:

class PaginatedData<T> {
  pagination: Pagination
  data: T
  links: Links
}

TODO: how to document this?

johannchopin commented 1 year ago

Ça me semble pas mal 👍 A voir comment sa s'intégre avec nest et prisma 🤔

Lyokolux commented 1 year ago

Ça me semble pas mal 👍 A voir comment sa s'intégre avec nest et prisma 🤔

Tkt