feat: organization schedules endpoints (#15584)

* feat: organization schedules endpoints

* refactor: add IsUserInOrg guard

* refactor: separate schedules controller folder

* tests

* chore: add roles guard and test it

* refactor: dont use Promise.all

* refactor: rely on profiles instead of user.organizationId

* feat: add pagination to getOrganizationSchedules

* refactor: default skip=0 and take=250

* chore: regenerate swagger doc
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2024-06-27 19:04:26 +00:00
1 parent dda4ce5338
commit 52c7a89785
10 files changed
+1080 -276

No files matched your search

+1
View File
@@ -301,6 +301,7 @@ model User {
verifiedNumbers VerifiedNumber[]
verifiedEmails VerifiedEmail[]
hosts Host[]
// organizationId is deprecated. Instead, rely on the Profile to search profiles by organizationId and then get user from the profile.
organizationId Int?
organization Team? @relation("scope", fields: [organizationId], references: [id], onDelete: SetNull)
accessCodes AccessCode[]