Update endpoint comments

This commit is contained in:
maru committed 2023-12-29 15:15:16 -05:00
1 parent be62fc939a
commit 6a7aafbff4
2 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -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"))
+3 -3
View File
@@ -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{}