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,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/fossyy/filekeeper/cache"
"github.com/fossyy/filekeeper/db"
googleOauthSetupHandler "github.com/fossyy/filekeeper/handler/auth/google/setup"
signinHandler "github.com/fossyy/filekeeper/handler/signin"
@ -156,7 +157,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
return
}
user, err := db.DB.GetUser(oauthUser.Email)
user, err := cache.GetUser(oauthUser.Email)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)