modified: main_dc/yalarba/api_yal/internal/handlers/auth.go
modified: main_dc/yalarba/easySite/easySite/app/pages/auth/login.vue add some handler and login into easys site login path
This commit is contained in:
@@ -14,14 +14,18 @@ func NewAuthHandler() *AuthHandler {
|
|||||||
|
|
||||||
// HandleAuth обрабатывает GET запросы на /auth
|
// HandleAuth обрабатывает GET запросы на /auth
|
||||||
func (h *AuthHandler) HandleAuth(w http.ResponseWriter, r *http.Request) {
|
func (h *AuthHandler) HandleAuth(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method != http.MethodGet {
|
switch r.Method {
|
||||||
|
case http.MethodGet:
|
||||||
|
// Обработка GET-запроса
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
w.Write([]byte("OK"))
|
||||||
|
case http.MethodPost:
|
||||||
|
// Обработка POST-запроса
|
||||||
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
||||||
|
default:
|
||||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Возвращаем статус 200 OK
|
|
||||||
w.WriteHeader(http.StatusOK)
|
|
||||||
w.Write([]byte("OK"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterAuthRoutes регистрирует маршруты для аутентификации
|
// RegisterAuthRoutes регистрирует маршруты для аутентификации
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
cl<template>
|
||||||
<div class="auth-page">
|
<div class="auth-page">
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
<div class="auth-card">
|
<div class="auth-card">
|
||||||
|
|||||||
Reference in New Issue
Block a user