mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-09-15 14:28:34 +08:00
fix group create type
This commit is contained in:
parent
d085b4e3c2
commit
3679fcc874
@ -5,11 +5,13 @@ import "Gwen/model"
|
||||
type GroupForm struct {
|
||||
Id uint `json:"id"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Type int `json:"type"`
|
||||
}
|
||||
|
||||
func (gf *GroupForm) FromGroup(group *model.Group) *GroupForm {
|
||||
gf.Id = group.Id
|
||||
gf.Name = group.Name
|
||||
gf.Type = group.Type
|
||||
return gf
|
||||
}
|
||||
|
||||
@ -17,5 +19,6 @@ func (gf *GroupForm) ToGroup() *model.Group {
|
||||
group := &model.Group{}
|
||||
group.Id = gf.Id
|
||||
group.Name = gf.Name
|
||||
group.Type = gf.Type
|
||||
return group
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user