diff --git a/api/account.go b/api/account.go index ddbadf6..7b2de36 100644 --- a/api/account.go +++ b/api/account.go @@ -23,7 +23,7 @@ const ( var isValidUsername = regexp.MustCompile(`^\w{1,16}$`).MatchString -// /api/account/info - get account info +// /account/info - get account info type AccountInfoResponse struct{ Username string `json:"string"` @@ -61,7 +61,7 @@ func (s *Server) HandleAccountInfo(w http.ResponseWriter, r *http.Request) { w.Write(response) } -// /api/account/register - register account +// /account/register - register account type AccountRegisterRequest GenericAuthRequest @@ -108,7 +108,7 @@ func (s *Server) HandleAccountRegister(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } -// /api/account/login - log into account +// /account/login - log into account type AccountLoginRequest GenericAuthRequest type AccountLoginResponse GenericAuthResponse @@ -170,7 +170,7 @@ func (s *Server) HandleAccountLogin(w http.ResponseWriter, r *http.Request) { w.Write(response) } -// /api/account/logout - log out of account +// /account/logout - log out of account func (s *Server) HandleAccountLogout(w http.ResponseWriter, r *http.Request) { token, err := base64.StdEncoding.DecodeString(r.Header.Get("Authorization")) diff --git a/api/savedata.go b/api/savedata.go index 06209c4..e709dac 100644 --- a/api/savedata.go +++ b/api/savedata.go @@ -2,7 +2,7 @@ package api import "net/http" -// /api/savedata/get - get save data +// /savedata/get - get save data type SavedataGetRequest struct{} type SavedataGetResponse struct{} @@ -11,7 +11,7 @@ func (s *Server) HandleSavedataGet(w http.ResponseWriter, r *http.Request) { } -// /api/savedata/update - update save data +// /savedata/update - update save data type SavedataUpdateRequest struct{} type SavedataUpdateResponse struct{} @@ -20,7 +20,7 @@ func (s *Server) HandleSavedataUpdate(w http.ResponseWriter, r *http.Request) { } -// /api/savedata/delete - delete save date +// /savedata/delete - delete save date type SavedataDeleteRequest struct{} type SavedataDeleteResponse struct{}