mirror of
https://github.com/pushbits/server.git
synced 2025-05-10 07:26:59 +02:00
Add scans with gosec
This commit is contained in:
parent
56f39cf64c
commit
5cd3627dc6
8 changed files with 47 additions and 12 deletions
|
@ -35,7 +35,11 @@ func (h *ApplicationHandler) registerApplication(ctx *gin.Context, a *model.Appl
|
|||
}
|
||||
|
||||
a.MatrixID = channelID
|
||||
h.DB.UpdateApplication(a)
|
||||
|
||||
err = h.DB.UpdateApplication(a)
|
||||
if success := successOrAbort(ctx, http.StatusInternalServerError, err); !success {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -55,7 +59,6 @@ func (h *ApplicationHandler) createApplication(ctx *gin.Context, u *model.User,
|
|||
|
||||
if err := h.registerApplication(ctx, &application, u); err != nil {
|
||||
err := h.DB.DeleteApplication(&application)
|
||||
|
||||
if success := successOrAbort(ctx, http.StatusInternalServerError, err); !success {
|
||||
log.Printf("Cannot delete application with ID %d.", application.ID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue