lab2 - оценка 4
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-15 10:34:56 +03:00
parent f07ad1e097
commit 7b0088a033
7 changed files with 400 additions and 29 deletions
+2 -2
View File
@@ -106,14 +106,14 @@ func (s *Server) createSession(w http.ResponseWriter, r *http.Request) {
})
}
// revokeSession — DELETE /api/v1/auth/sessions/current: отзыв токена, 204 без тела.
// revokeSession — DELETE /api/v1/auth/sessions/current: отзыв токена.
func (s *Server) revokeSession(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodDelete {
methodNotAllowed(w, r)
return
}
if err := s.store.RevokeSession(r.Context(), currentToken(r)); err != nil {
apperr.Write(w, requestID(r), apperr.Internal("internal error"))
apperr.Write(w, requestID(r), apperr.Unavailable("logout not confirmed, please retry"))
return
}
writeNoContent(w, r)