Commit Graph

16 Commits (8e25b9244c1c1b57f4f3d2da74a0e28e28de9196)

Author SHA1 Message Date
Omar López 18e96e2a47
Refactors availabilities endpoints (#177)
refs #175
2022-10-10 09:42:15 -06:00
Joe Au-Yeung d68ce5e72f
Admin privileges for /availabilities endpoint (#169)
* List other user's availabilities

* /availabilityId methods for other users

* Add return statements

* Accept userId single value or array

* Add zod schema checks

* Filter for schedules only with an availability

* Adds safeParsing of JSON before safeParsing of zod

* Removed console log

* Adds safe JSON parsing before .safeParse

* Allow API call without necessarily passing userId

Allow `/availabilities` call by a regular user without having to pass their userId to make it work

Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
2022-10-07 15:26:02 +05:30
Agusti Fernandez Pardo 238b03791e Fix: add strict and optional to have errors on extraneus params 2022-04-27 19:45:59 +02:00
Agusti Fernandez Pardo e52af0bbef fix: post / patch attendees docs w examples 2022-04-27 19:25:36 +02:00
Agusti Fernandez Pardo 14e2964a6d fix: booking reference moved to pick-first create/edit separate validations 2022-04-26 22:48:15 +02:00
Agusti Fernandez Pardo 6997606a4c fix: moves to pick and separates availabilities 2022-04-26 22:23:33 +02:00
Agusti Fernandez Pardo ad04be9394 fix: availability patch 2022-04-25 06:13:27 +02:00
Agusti Fernandez Pardo b6bce18b29 fix: build availabilities validation start/endTime accept only dates no numbers or strings too 2022-04-25 06:04:42 +02:00
Agusti Fernandez Pardo 804fe27458 fix availabilites validations 2022-04-25 03:12:33 +02:00
Agusti Fernandez Pardo dad70d5a12 fix users, availabilites, attendees 2022-04-24 02:10:32 +02:00
Agusti Fernandez Pardo 2b4a745f12 feat: improve validations of users/attendee/availabilty to support required fields 2022-04-01 22:04:42 +02:00
Agusti Fernandez Pardo 9aa4b0e30d feat: inherit all validations from auto-generated zod 2022-03-30 17:37:51 +02:00
Agusti Fernandez Pardo 1de7bc4146 prettier 2022-03-30 14:17:55 +02:00
Agusti Fernandez Pardo 0e3131d866 feat: improve validations 2022-03-27 15:15:46 +02:00
Agusti Fernandez Pardo c561b16f85 chore: rename empty validations, enable relations on user zod object 2022-03-27 01:19:49 +01:00
Agusti Fernandez Pardo 936572e7e1 feat: adds availabilitesi and attendees endpoints, some cleanup less try/catch more if/else 2022-03-27 00:58:22 +01:00