2023-05-20 20:15:57 +02:00
|
|
|
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-05-15 23:57:38 +02:00
|
|
|
package handlers
|
|
|
|
|
|
|
|
type userSignin struct {
|
2023-05-28 18:57:37 +02:00
|
|
|
Username string `form:"username" json:"username" validate:"required,username"`
|
|
|
|
Password string `form:"password" json:"password" validate:"required,password"`
|
2023-05-15 23:57:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type userSignup struct {
|
2023-05-28 18:57:37 +02:00
|
|
|
Username string `form:"username" json:"username" validate:"required,username"`
|
|
|
|
Email string `form:"email" json:"email" validate:"required,email"`
|
|
|
|
Password string `form:"password" json:"password" validate:"required,password"`
|
2023-05-15 23:57:38 +02:00
|
|
|
}
|
2023-05-22 06:47:33 +02:00
|
|
|
|
|
|
|
type userCreate struct {
|
|
|
|
Username string `form:"username" json:"username" validate:"required,username"`
|
|
|
|
Email string `form:"email" json:"email" validate:"required,email"`
|
|
|
|
Password string `form:"password" json:"password" validate:"required,password"`
|
|
|
|
RepeatPassword string `form:"repeatPassword" json:"repeatPassword" validate:"required,repeatPassword"`
|
|
|
|
IsAdmin bool `form:"isAdmin" json:"isAdmin" validate:"required,isAdmin"`
|
|
|
|
IsActive *bool `form:"isActive" json:"isActive" validate:"omitempty,isActive"`
|
|
|
|
}
|
2023-05-29 22:42:18 +02:00
|
|
|
|
|
|
|
type userID struct {
|
|
|
|
ID string `param:"id" validate:"required,id"`
|
|
|
|
}
|