Auth for everything (and everything auth) #6 #35

Merged
philipp merged 39 commits from feature/6-api_auth into dev 2020-12-18 21:53:18 +00:00
Showing only changes of commit 476afc6a99 - Show all commits

View File

@ -67,7 +67,7 @@ export class CreateUser {
* Optional.
*/
@IsOptional()
groupId?: number[] | number
group?: number[] | number
//TODO: ProfilePics
@ -81,11 +81,11 @@ export class CreateUser {
throw new UsernameOrEmailNeededError();
}
if (this.groupId) {
if (!Array.isArray(this.groupId)) {
this.groupId = [this.groupId]
if (this.group) {
if (!Array.isArray(this.group)) {
this.group = [this.group]
}
const groupIDs: number[] = this.groupId
const groupIDs: number[] = this.group
let errors = 0
const validateusergroups = async () => {
let foundgroups = []