Finalize 2FA implementation

This commit is contained in:
2024-06-20 08:49:49 +07:00
parent 0e16d59df9
commit c5185d5107
8 changed files with 87 additions and 77 deletions

View File

@ -5,7 +5,7 @@ import (
"context"
"errors"
"fmt"
"github.com/fossyy/filekeeper/db"
"github.com/fossyy/filekeeper/cache"
"github.com/google/uuid"
"net/http"
"strconv"
@ -87,7 +87,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
emailForm := r.Form.Get("email")
user, err := db.DB.GetUser(emailForm)
user, err := cache.GetUser(emailForm)
if errors.Is(err, gorm.ErrRecordNotFound) {
component := forgotPasswordView.Main("Filekeeper - Forgot Password Page", types.Message{
Code: 0,