Swap out the rest of chi
We're now chi-free. Not bug-free.
This commit is contained in:
parent
6c311c76e3
commit
ab519020fc
24 changed files with 172 additions and 139 deletions
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/Gleipnir-Technology/nidus-sync/html"
|
||||
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
@ -101,7 +101,8 @@ func listUserSuggestion(ctx context.Context, r *http.Request, user platform.User
|
|||
|
||||
func userPut(ctx context.Context, r *http.Request, user platform.User, updates platform.UserChangeRequest) (string, *nhttp.ErrorWithStatus) {
|
||||
log.Info().Str("avatar", updates.Avatar).Msg("doing updates")
|
||||
user_id_str := chi.URLParam(r, "id")
|
||||
vars := mux.Vars(r)
|
||||
user_id_str := vars["id"]
|
||||
user_id, err := strconv.Atoi(user_id_str)
|
||||
if err != nil {
|
||||
return "", nhttp.NewErrorStatus(http.StatusBadRequest, "user update: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue