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