added some missing defer close()

This commit is contained in:
BroodjeAap 2023-01-30 20:23:12 +00:00
parent 3e218a8172
commit e0ace15709
2 changed files with 2 additions and 1 deletions

View file

@ -541,6 +541,7 @@ func (web *Web) watchCreatePost(c *gin.Context) {
c.AbortWithError(http.StatusBadRequest, err)
return
}
defer openedFile.Close()
jsn, _ = ioutil.ReadAll(openedFile)
} else { // selected one of the templates
templateFiles, err := EMBED_FS.ReadDir("watchTemplates")
@ -1207,6 +1208,7 @@ func (web *Web) importWatch(c *gin.Context) {
c.AbortWithError(http.StatusBadRequest, err)
return
}
defer openedFile.Close()
jsn, _ := ioutil.ReadAll(openedFile)
export := WatchExport{}

View file

@ -13,4 +13,3 @@
- ~~restore from upload~~
- browserless function filters
- url path support
- defer formfile.close()