From 900ae006b894116ddc947dead1035d4b2d3e6944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 14 Mar 2021 20:26:58 +0100 Subject: [PATCH] fmt. --- internal/api/members/controler.go | 10 +++++----- internal/member/file/provider.go | 2 +- internal/member/manager.go | 2 +- internal/member/object/provider.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/api/members/controler.go b/internal/api/members/controler.go index 3ed94df7..76c01694 100644 --- a/internal/api/members/controler.go +++ b/internal/api/members/controler.go @@ -1,16 +1,16 @@ package members import ( - "strconv" "net/http" + "strconv" "demodesk/neko/internal/types" "demodesk/neko/internal/utils" ) type MemberDataPayload struct { - ID string `json:"id"` - Profile types.MemberProfile `json:"profile"` + ID string `json:"id"` + Profile types.MemberProfile `json:"profile"` } type MemberCreatePayload struct { @@ -65,7 +65,7 @@ func (h *MembersHandler) membersCreate(w http.ResponseWriter, r *http.Request) { CanAccessClipboard: true, }, } - + if !utils.HttpJsonRequest(w, r, data) { return } @@ -85,7 +85,7 @@ func (h *MembersHandler) membersCreate(w http.ResponseWriter, r *http.Request) { utils.HttpInternalServerError(w, err) return } - + utils.HttpSuccess(w, MemberDataPayload{ ID: id, Profile: data.Profile, diff --git a/internal/member/file/provider.go b/internal/member/file/provider.go index 6ec004bf..e6435051 100644 --- a/internal/member/file/provider.go +++ b/internal/member/file/provider.go @@ -61,7 +61,7 @@ func (provider *MemberProviderCtx) Insert(username string, password string, prof entries[id] = MemberEntry{ // TODO: Use hash function. Password: password, - Profile: profile, + Profile: profile, } return id, provider.serialize(entries) diff --git a/internal/member/manager.go b/internal/member/manager.go index fd502dea..2938d75d 100644 --- a/internal/member/manager.go +++ b/internal/member/manager.go @@ -36,7 +36,7 @@ func New(sessions types.SessionManager, config *config.Member) *MemberManagerCtx default: manager.provider = dummy.New() } - + return manager } diff --git a/internal/member/object/provider.go b/internal/member/object/provider.go index 7cfa1dde..8a194b2c 100644 --- a/internal/member/object/provider.go +++ b/internal/member/object/provider.go @@ -83,7 +83,7 @@ func (provider *MemberProviderCtx) Insert(username string, password string, prof provider.entries[id] = &MemberEntry{ // TODO: Use hash function. Password: password, - Profile: profile, + Profile: profile, } return id, nil