From 621fd880a26254d264008401da50efc4a408679a Mon Sep 17 00:00:00 2001 From: mountain Date: Mon, 5 Jun 2023 18:01:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/api.go | 2 +- core/service.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/api.go b/core/api.go index ec1e5f4..a975c13 100644 --- a/core/api.go +++ b/core/api.go @@ -466,7 +466,7 @@ func (caller apiCaller) maintenanceAPI(w http.ResponseWriter, r *http.Request) e } else if r.Method == "POST" { servicename := queryvals.Get("name") - var divs map[string]*division + var divs map[string]*Division dec := json.NewDecoder(r.Body) if err := dec.Decode(&divs); err != nil { w.WriteHeader(http.StatusBadRequest) diff --git a/core/service.go b/core/service.go index 0e57c0e..c3dfca4 100644 --- a/core/service.go +++ b/core/service.go @@ -165,7 +165,7 @@ type Maintenance struct { link string } -type division struct { +type Division struct { Url string // 요것은 클라이언트 빌드하고 나서 json:"-"으로 변경하자. 클라이언트에 직접 내려보내지 않음 Priority int State DivisionStateName @@ -182,7 +182,7 @@ type ServiceDescriptionSummary struct { type serviceDescription struct { ServiceDescriptionSummary `bson:",inline"` - Divisions map[string]*division `bson:"divisions"` + Divisions map[string]*Division `bson:"divisions"` ServerApiTokens []primitive.ObjectID `bson:"api_tokens"` ApiUsers map[string][]string `bson:"api_users"`