1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-16 17:00:19 +00:00

feat: add ability define user groups for sign up tokens (#1155)

This commit is contained in:
Elias Schneider
2025-12-21 18:26:52 +01:00
committed by GitHub
parent f5da11b99b
commit 59ca6b26ac
23 changed files with 391 additions and 162 deletions

View File

@@ -6,8 +6,9 @@ import (
)
type SignupTokenCreateDto struct {
TTL utils.JSONDuration `json:"ttl" binding:"required,ttl"`
UsageLimit int `json:"usageLimit" binding:"required,min=1,max=100"`
TTL utils.JSONDuration `json:"ttl" binding:"required,ttl"`
UsageLimit int `json:"usageLimit" binding:"required,min=1,max=100"`
UserGroupIDs []string `json:"userGroupIds"`
}
type SignupTokenDto struct {
@@ -16,5 +17,6 @@ type SignupTokenDto struct {
ExpiresAt datatype.DateTime `json:"expiresAt"`
UsageLimit int `json:"usageLimit"`
UsageCount int `json:"usageCount"`
UserGroups []UserGroupDto `json:"userGroups"`
CreatedAt datatype.DateTime `json:"createdAt"`
}