#73 implement PostSignup serverside
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 1m0s
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Failing after 1m0s
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
metrics = promauto.NewCounterVec(
|
||||
metricsWorkout = promauto.NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Name: "mefit_api_workout_total",
|
||||
Help: "The total number of workout api requests processed",
|
||||
@@ -24,7 +24,7 @@ var (
|
||||
|
||||
func NewWorkout(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
metrics.WithLabelValues("new").Inc()
|
||||
metricsWorkout.WithLabelValues("new").Inc()
|
||||
|
||||
var dateStr = r.FormValue("date")
|
||||
var typeStr = r.FormValue("type")
|
||||
@@ -67,7 +67,7 @@ func NewWorkout(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
func GetWorkouts(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
metrics.WithLabelValues("get").Inc()
|
||||
metricsWorkout.WithLabelValues("get").Inc()
|
||||
|
||||
// token := r.Context().Value(middleware.TOKEN_KEY).(*auth.Token)
|
||||
// var userId = token.UID
|
||||
@@ -109,7 +109,7 @@ func GetWorkouts(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
func DeleteWorkout(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
metrics.WithLabelValues("delete").Inc()
|
||||
metricsWorkout.WithLabelValues("delete").Inc()
|
||||
|
||||
// token := r.Context().Value(middleware.TOKEN_KEY).(*auth.Token)
|
||||
// var userId = token.UID
|
||||
|
||||
Reference in New Issue
Block a user