add optional welcome email for new users

When enabled, an email with the server URL and username will be sent to
created users. Requested in #38.
This commit is contained in:
Harvey Tindall
2021-01-24 15:19:58 +00:00
parent 406fef6595
commit ea262ca60b
12 changed files with 199 additions and 10 deletions
+6
View File
@@ -17,6 +17,12 @@ type newUserDTO struct {
Code string `json:"code" example:"abc0933jncjkcjj"` // Invite code (required on /newUser)
}
type newUserResponse struct {
User bool `json:"user" binding:"required"` // Whether user was created successfully
Email bool `json:"email"` // Whether welcome email was successfully sent (always true if feature is disabled
Error string `json:"error"` // Optional error message.
}
type deleteUserDTO struct {
Users []string `json:"users" binding:"required"` // List of usernames to delete
Notify bool `json:"notify"` // Whether to notify users of deletion