Omar López
f13694fd13
Refactors event-types endpoints ( #181 )
...
refs #175
2022-10-11 14:14:03 -06:00
zomars
4ba0395efa
Permission fixes
2022-10-11 14:09:22 -06:00
Hariom Balhara
7aeb247b1a
Delete unused file. If needed import from @calcom/core ( #156 )
2022-10-11 15:36:18 +01:00
Alex van Andel
a506c7da33
Refactor + fix userIds filter ( #179 )
...
This fix means a behaviour change to GET calls. Instead of a JSON
payload, instead a filter param has been added to the URL itself. GET
payloads are very unexpected in API designs, even though supported.
* Todo write tests (with postman?)
* Turn isAdmin logic into common middleware
```bash
curl "http://localhost:3002/v1/schedules?apiKey=...&userId=2 "
```
```bash
curl "http://localhost:3002/v1/schedules?apiKey= ..." \
-d '{"name":"Hello", "userId": 2}' \
-H 'Content-Type: application/json'
```
2022-10-11 15:33:25 +01:00
Omar López
da61841525
Refactors booking references endpoints ( #180 )
...
refs #175
2022-10-11 15:25:57 +01:00
zomars
88332fb2ab
Refactors teams
2022-10-10 20:25:47 -06:00
zomars
c03144c343
Fixed major flaw with authMiddleware
...
authMiddleware should not use defaultResponder directly as it will catch thrown error and we need those errors to prevent running the rest of the code.
2022-10-10 20:23:08 -06:00
zomars
a35454bb68
Me cleanup
2022-10-10 18:02:36 -06:00
Omar López
18e96e2a47
Refactors availabilities endpoints ( #177 )
...
refs #175
2022-10-10 09:42:15 -06:00
Omar López
cb9ce8a8c5
Merge pull request #176 from calcom/refactor/attendees
...
Refactors attendees' endpoints
2022-10-07 16:08:09 -06:00
zomars
d4a2b8e791
Refactors attendees' endpoints
2022-10-07 13:08:25 -06:00
Omar López
85890a6acb
Merge pull request #172 from calcom/fix/invalid-eventtypeid
...
Recurring event booking: invalid eventTypeId
2022-10-07 10:59:14 -06:00
Syed Ali Shahbaz
f5d953ef1c
Hotfix/schedule ( #174 )
...
* Allows empty call
An authorized API call by a non-admin user with empty body will still fetch his data now
* Adds missing return
2022-10-07 15:33:04 +05:30
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
Syed Ali Shahbaz
0abf286785
Merge pull request #168 from calcom/create-schedule-with-availability
...
Admin privileges for /schedules
2022-10-07 10:23:41 +02:00
Syed Ali Shahbaz
628306793d
Prettier fix :/
2022-10-07 13:47:46 +05:30
Syed Ali Shahbaz
b05b6e48e7
Fixes another typo
2022-10-07 13:41:17 +05:30
Syed Ali Shahbaz
8eaad0c1c6
fixed typo
2022-10-07 13:34:02 +05:30
Syed Ali Shahbaz
9a65c547dc
Adds missing return after res
2022-10-07 13:24:55 +05:30
Syed Ali Shahbaz
cc01e47d58
Merge pull request #173 from calcom/fix/create-schedule-availability
...
Fix/create schedule availability
2022-10-07 09:46:07 +02:00
Syed Ali Shahbaz
21e081c64c
Adds meaningful response for API caller
2022-10-07 13:15:35 +05:30
Syed Ali Shahbaz
affba8bf66
Adds meaningful response for API caller
2022-10-07 13:13:56 +05:30
Syed Ali Shahbaz
3bdebba21e
Adds meaningful response for the API caller
2022-10-07 13:12:57 +05:30
Syed Ali Shahbaz
79fabe0333
Adds safeParseJSON to the body
2022-10-07 13:03:09 +05:30
Syed Ali Shahbaz
36a0ebfbad
Adds safe json parse of the body
...
It ensures that the body complies with the safe parsing of the JSON so that if the body sent is not a valid JSON, we convert it into an empty JSON. Would improve in handling the response of such cases as a follow up for improved UX
2022-10-07 12:46:35 +05:30
Syed Ali Shahbaz
12f54773f9
Adds safeParseJSON.ts file
2022-10-07 12:43:47 +05:30
Leo Giovanetti
70b9969fe3
Fixing en error case for invalid eventTypeId
2022-10-06 18:27:49 -03:00
Leo Giovanetti
2a05f15156
Recurring booking implementation ( #167 )
...
* Recurring booking implementation
* Tweaks to expected texts in tests
* Applied feedback
Co-authored-by: zomars <zomars@me.com>
2022-10-06 17:40:41 -03:00
Joe Au-Yeung
da88beb1f5
Fix type errors
2022-10-06 15:06:07 -04:00
Joe Au-Yeung
00ccb4ffd1
Simplify get /schedules
2022-10-06 14:41:50 -04:00
Joe Au-Yeung
2a7a111855
Safe parse for userId
2022-10-06 14:38:17 -04:00
Omar López
7909d90915
Merge pull request #170 from calcom/admin-event-types
...
Allow for admin to edit other user's event types
2022-10-06 10:33:52 -06:00
Joe Au-Yeung
48f270d032
Remove console log
2022-10-06 10:59:46 -04:00
Joe Au-Yeung
34f5f5f83f
Pass userId as single value or array
2022-10-06 10:55:14 -04:00
Joe Au-Yeung
4ac9c1e6dd
Remove old comment
2022-10-06 10:02:35 -04:00
Joe Au-Yeung
372e188228
Pass userId as a single value or an array
2022-10-06 09:55:34 -04:00
Joe Au-Yeung
77b89fda05
Add return statements
2022-10-05 16:02:34 -04:00
Joe Au-Yeung
ce8af8b6a5
Allow for admin to edit other user's event types
2022-10-05 15:59:34 -04:00
Joe Au-Yeung
a5413b40ab
Add ability to get, post, and delete for other users if admin
2022-10-05 11:04:58 -04:00
Joe Au-Yeung
95fc04a453
Add check for userId and admin to top
2022-10-05 10:05:04 -04:00
Joe Au-Yeung
1adace1c0d
Create new availability on new schedule
2022-10-05 09:56:27 -04:00
Joe Au-Yeung
7e9226fabc
Merge pull request #165 from calcom/hotfix/connect-user-on-new-event-type
2022-10-04 09:11:22 -04:00
Joe Au-Yeung
362d8ca769
Connect user to new event type
2022-10-03 14:26:00 -04:00
Peer Richelsen
d14c8404e7
Update index.ts
2022-09-24 13:23:10 +00:00
Omar López
a36b6fa923
Merge pull request #163 from calcom/fix/admin-me
...
fix: userId not 0 for fixing /me endpoint
2022-09-07 13:31:50 -06:00
Agusti Fernandez Pardo
be200cd076
fix: userId not 0 for fixing /me endpoint
2022-09-07 18:18:43 +02:00
Agusti Fernandez Pardo
fcb9ca6ace
Merge pull request #162 from calcom/fix/no-prisma-defined
2022-09-06 19:40:48 +02:00
Agusti Fernandez Pardo
fc4d0ab3ea
fix: prisma not defined
2022-09-06 19:40:23 +02:00
Agusti Fernandez Pardo
5d09739966
Merge pull request #161 from calcom/fix/me
2022-09-06 19:20:41 +02:00
Agusti Fernandez Pardo
80bd5068d4
fix: don't use defaultHandler w promise in api yet, was from console
2022-09-06 19:20:04 +02:00