fix
This commit is contained in:
@@ -298,6 +298,7 @@ func GoogleCallback(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
helper.LogError(err, "Authorization check failed")
|
helper.LogError(err, "Authorization check failed")
|
||||||
helper.RespondWithError(w, http.StatusBadGateway, "Authorization check failed")
|
helper.RespondWithError(w, http.StatusBadGateway, "Authorization check failed")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !allowed {
|
if !allowed {
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ func main() {
|
|||||||
|
|
||||||
helper.LogInfo("INFO: Authentication Microservice is running on http://localhost:8081")
|
helper.LogInfo("INFO: Authentication Microservice is running on http://localhost:8081")
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: ":8080",
|
Addr: ":8081",
|
||||||
Handler: handler,
|
Handler: handler,
|
||||||
ReadTimeout: 15 * time.Second,
|
ReadTimeout: 15 * time.Second,
|
||||||
WriteTimeout: 300 * time.Second,
|
WriteTimeout: 300 * time.Second,
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
func GetUserID(email string) (string, error) {
|
func GetUserID(email string) (string, error) {
|
||||||
log.Print(email)
|
log.Print(email)
|
||||||
query := `SELECT user_id, FROM users WHERE email_address = ? AND is_deleted = 0 LIMIT 1;`
|
query := `SELECT user_id FROM users WHERE email_address = ? AND is_deleted = 0 LIMIT 1;`
|
||||||
var id string
|
var id string
|
||||||
err := db.DB.QueryRow(query, email).Scan(&id)
|
err := db.DB.QueryRow(query, email).Scan(&id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user