Skip to content

Commit

Permalink
ADD default type for create app.
Browse files Browse the repository at this point in the history
  • Loading branch information
karminski committed Feb 22, 2024
1 parent 47bc50c commit 762b1c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/request/create_app_request.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package request

const (
APP_DEFAULT_TYPE_STRING = "pc"
)

type CreateAppRequest struct {
Name string `json:"appName" validate:"required"`
InitScheme interface{} `json:"initScheme"`
Expand All @@ -19,5 +23,8 @@ func (req *CreateAppRequest) ExportInitScheme() interface{} {
}

func (req *CreateAppRequest) ExportAppType() string {
if req.AppType == "" {
return APP_DEFAULT_TYPE_STRING
}
return req.AppType
}

0 comments on commit 762b1c1

Please sign in to comment.