@@ -75,7 +75,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
7575 opts []repo.DBOption
7676 )
7777 if create .Name != "" {
78- opts = append (opts , commonRepo .WithByLikeName (create .Name ))
78+ opts = append (opts , commonRepo .WithByName (create .Name ))
7979 }
8080 if create .Type != "" {
8181 opts = append (opts , commonRepo .WithByType (create .Type ))
@@ -108,7 +108,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
108108 return nil , err
109109 }
110110 }
111- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
111+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDotNet :
112112 if ! fileOp .Stat (create .CodeDir ) {
113113 return nil , buserr .New (constant .ErrPathNotFound )
114114 }
@@ -140,7 +140,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
140140 }
141141
142142 appVersionDir := filepath .Join (app .GetAppResourcePath (), appDetail .Version )
143- if ! fileOp .Stat (appVersionDir ) || appDetail . Update {
143+ if ! fileOp .Stat (appVersionDir ) {
144144 if err = downloadApp (app , appDetail , nil , nil ); err != nil {
145145 return nil , err
146146 }
@@ -162,7 +162,7 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
162162 if err = handlePHP (create , runtime , fileOp , appVersionDir ); err != nil {
163163 return nil , err
164164 }
165- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
165+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDotNet :
166166 runtime .Port = int (create .Params ["port" ].(float64 ))
167167 if err = handleNodeAndJava (create , runtime , fileOp , appVersionDir ); err != nil {
168168 return nil , err
@@ -341,7 +341,7 @@ func (r *RuntimeService) Get(id uint) (*response.RuntimeDTO, error) {
341341 }
342342 }
343343 res .AppParams = appParams
344- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
344+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDotNet :
345345 res .Params = make (map [string ]interface {})
346346 envs , err := gotenv .Unmarshal (runtime .Env )
347347 if err != nil {
@@ -440,7 +440,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
440440 if exist != nil {
441441 return buserr .New (constant .ErrImageExist )
442442 }
443- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
443+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDotNet :
444444 if runtime .Port != req .Port {
445445 if err = checkPortExist (req .Port ); err != nil {
446446 return err
@@ -516,7 +516,7 @@ func (r *RuntimeService) Update(req request.RuntimeUpdate) error {
516516 return err
517517 }
518518 go buildRuntime (runtime , imageID , oldEnv , req .Rebuild )
519- case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython :
519+ case constant .RuntimeNode , constant .RuntimeJava , constant .RuntimeGo , constant .RuntimePython , constant . RuntimeDotNet :
520520 runtime .Version = req .Version
521521 runtime .CodeDir = req .CodeDir
522522 runtime .Port = req .Port
@@ -682,7 +682,7 @@ func (r *RuntimeService) SyncRuntimeStatus() error {
682682 return err
683683 }
684684 for _ , runtime := range runtimes {
685- if runtime .Type == constant .RuntimeNode || runtime .Type == constant .RuntimeJava || runtime .Type == constant .RuntimeGo || runtime .Type == constant .RuntimePython {
685+ if runtime .Type == constant .RuntimeNode || runtime .Type == constant .RuntimeJava || runtime .Type == constant .RuntimeGo || runtime .Type == constant .RuntimePython || runtime . Type == constant . RuntimeDotNet {
686686 _ = SyncRuntimeContainerStatus (& runtime )
687687 }
688688 }
0 commit comments