File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -443,6 +443,9 @@ func (a *app) projectRoute(w http.ResponseWriter, r *http.Request) {
443443 jsonError (w , 500 , "internal_error" , "Não foi possível atualizar o projeto." )
444444 return
445445 }
446+ if userID , ok := r .Context ().Value (userKey {}).(int64 ); ok {
447+ a .audit (userID , "project.updated" , "project" , id )
448+ }
446449 a .publish ("project.updated" , map [string ]any {"id" : id })
447450 w .WriteHeader (http .StatusNoContent )
448451}
@@ -538,6 +541,9 @@ func (a *app) applicationRoute(w http.ResponseWriter, r *http.Request) {
538541 jsonError (w , 500 , "internal_error" , "Não foi possível atualizar a aplicação." )
539542 return
540543 }
544+ if userID , ok := r .Context ().Value (userKey {}).(int64 ); ok {
545+ a .audit (userID , "application.updated" , "application" , id )
546+ }
541547 a .publish ("application.updated" , map [string ]any {"id" : id })
542548 w .WriteHeader (http .StatusNoContent )
543549}
You can’t perform that action at this time.
0 commit comments