Skip to content

Commit

Permalink
Comment unused CAS
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Dec 23, 2024
1 parent 81c9d67 commit 35b33e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/telegram/middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package telegram

import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"time"

"github.com/plugfox/foxy-gram-server/internal/converters"
Expand All @@ -19,7 +16,7 @@ const (
contextKeyShouldVerify = "should_verify" // Context key for the verification flag, we should verify the user
)

var errorUnexpectedStatusCode = fmt.Errorf("unexpected status code")
// var errorUnexpectedStatusCode = fmt.Errorf("unexpected status code")

// Check if the chat is allowed.
func allowedChats(chatID int64) bool {
Expand Down Expand Up @@ -66,6 +63,7 @@ func isUserLocalBanned(db *storage.Storage, user *tele.User) (bool, error) {
return false, nil
}

/*
// Verify the user with a CAS ban
func isUserCASBanned(httpClient *http.Client, user *tele.User) (bool, error) {
// Check CAS ban
Expand Down Expand Up @@ -116,6 +114,7 @@ func isUserCASBanned(httpClient *http.Client, user *tele.User) (bool, error) {
// Return whether the user is flagged by CAS
return casResponse.Ok, nil
}
*/

// Verify user middleware - verify the user with a captcha
func verifyUserMiddleware(
Expand Down Expand Up @@ -258,6 +257,7 @@ func verifyUserWithLocalDB(
}
}

/*
// Verify the user with a CAS ban
func verifyUserWithCAS(
db *storage.Storage,
Expand Down Expand Up @@ -320,6 +320,7 @@ func verifyUserWithCAS(
}
}
}
*/

// Verify the user with a captcha
func verifyUserWithCaptcha(
Expand Down

0 comments on commit 35b33e1

Please sign in to comment.