Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbrzzl committed Jan 14, 2025
1 parent 90027c8 commit 7423d88
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/http/requests/user_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
)

type UserCreate struct {
Name string `form:"name" json:"name"`
Tags []string `form:"tags" json:"tags"`
Scores []int `form:"scores" json:"scores"`
Date carbon.Carbon `form:"date" json:"date"`
Code int `form:"code" json:"code"`
Name string `form:"name" json:"name"`
AgentID []string `form:"agent_id" json:"agent_id"`
Tags []string `form:"tags" json:"tags"`
Scores []int `form:"scores" json:"scores"`
Date carbon.Carbon `form:"date" json:"date"`
Code int `form:"code" json:"code"`
}

func (r *UserCreate) Authorize(ctx http.Context) error {
Expand All @@ -22,6 +23,7 @@ func (r *UserCreate) Authorize(ctx http.Context) error {
func (r *UserCreate) Rules(ctx http.Context) map[string]string {
return map[string]string{
"name": "required",
"agent_id": "required",
"tags.*": "required|string",
"scores.*": "required|int",
"date": "required|date",
Expand Down

0 comments on commit 7423d88

Please sign in to comment.