From 5bf959a3a5f5530691eb4c900a4787dc0b15e662 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 14 Apr 2024 14:36:40 +0200 Subject: [PATCH] Convert the remaining `interface{}`s to `any` Signed-off-by: Gergely Nagy --- routers/web/user/profile.go | 2 +- tests/integration/integration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 2e4b9dae65..1893e91221 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -376,7 +376,7 @@ func Action(ctx *context.Context) { } if redirectViaJSON { - ctx.JSON(http.StatusOK, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]any{ "redirect": ctx.ContextUser.HomeLink(), }) return diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 8fd55d7fa8..adba52fee0 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -621,7 +621,7 @@ func VerifyJSONSchema(t testing.TB, resp *httptest.ResponseRecorder, schemaFile schema, err := jsonschema.Compile(schemaFilePath) assert.NoError(t, err) - var data interface{} + var data any err = json.Unmarshal(resp.Body.Bytes(), &data) assert.NoError(t, err)