From ec33952aaab5b56caaa04f6300f291535509c4fe Mon Sep 17 00:00:00 2001 From: maru Date: Sun, 28 Apr 2024 17:41:00 -0400 Subject: [PATCH] Simplify variable declaration --- api/endpoints.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/endpoints.go b/api/endpoints.go index 99bf21f..aff1365 100644 --- a/api/endpoints.go +++ b/api/endpoints.go @@ -225,8 +225,7 @@ func handleSaveData(w http.ResponseWriter, r *http.Request) { return } - var trainerId = 0 - var secretId = 0 + var trainerId, secretId int if r.URL.Path != "/savedata/update" || datatype == 1 { if r.URL.Query().Has("trainerId") && r.URL.Query().Has("secretId") {