added missing required validation
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AvailabilityDB struct {
|
type AvailabilityDB struct {
|
||||||
Id int `db:"id" json:"id" validate:"required"`
|
Id int `db:"id" json:"id" validate:"required"`
|
||||||
Availability
|
Availability `validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Availability struct {
|
type Availability struct {
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type TaskDB struct {
|
type TaskDB struct {
|
||||||
ID int `json:"id" db:"id"`
|
ID int `json:"id" db:"id" validate:"required"`
|
||||||
Task
|
Task `valdate:"required" `
|
||||||
}
|
}
|
||||||
|
|
||||||
type Task struct {
|
type Task struct {
|
||||||
Text string `json:"text" db:"text"`
|
Text string `json:"text" db:"text" validate:"required"`
|
||||||
Enabled bool `json:"enabled" db:"enabled"`
|
Enabled bool `json:"enabled" db:"enabled" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetSlice() ([]TaskDB, error) {
|
func GetSlice() ([]TaskDB, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user