Add prometheus endpoint for getting metrics (#33)
This commit is contained in:
parent
ee398b5272
commit
e047673c6b
189 changed files with 44128 additions and 94 deletions
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package models
|
||||
|
||||
import "code.vikunja.io/api/pkg/metrics"
|
||||
|
||||
// DeleteUserByID deletes a user by its ID
|
||||
func DeleteUserByID(id int64, doer *User) error {
|
||||
// Check if the id is 0
|
||||
|
|
@ -30,5 +32,8 @@ func DeleteUserByID(id int64, doer *User) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Update the metrics
|
||||
metrics.UpdateCount(-1, metrics.ActiveUsersKey)
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue