All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #322 | Page horaire | ## Description de la PR [#322] Page horaire ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #4 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
14 lines
325 B
TypeScript
14 lines
325 B
TypeScript
import type { Contract } from './dto/contract'
|
|
import { extractItems } from '~/utils/api'
|
|
|
|
export const listContracts = async () => {
|
|
const api = useApi()
|
|
const data = await api.get<Contract[] | { 'hydra:member'?: Contract[] }>(
|
|
'/contracts',
|
|
{},
|
|
{ toast: false }
|
|
)
|
|
|
|
return extractItems<Contract>(data)
|
|
}
|