Skip to content

Commit

Permalink
Merge pull request #138 from Quaver/remove-dono-clans
Browse files Browse the repository at this point in the history
Remote donator requirement for clans
  • Loading branch information
Swan authored Dec 6, 2024
2 parents cef5e57 + aa8c8b6 commit 9385bcb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions handlers/clan_scores.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package handlers

import (
"net/http"
"strconv"

"github.com/Quaver/api2/db"
"github.com/Quaver/api2/enums"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"net/http"
"strconv"
)

// GetClanScoresForMode Retrieves clan scores for a given mode
Expand Down Expand Up @@ -78,10 +79,6 @@ func GetClanScoresForMap(c *gin.Context) *APIError {
return apiErr
}

if !hasDonatorScoreboardAccess(dbMap, getAuthedUser(c)) {
return APIErrorForbidden("You must be a donator to access this score.")
}

clanScores, err := db.GetClanScoreboardForMap(dbMap.MD5)

if err != nil {
Expand All @@ -107,10 +104,6 @@ func GetClanPersonalBestScore(c *gin.Context) *APIError {
return apiErr
}

if !hasDonatorScoreboardAccess(dbMap, getAuthedUser(c)) {
return APIErrorForbidden("You must be a donator to access this score.")
}

clanScore, err := db.GetClanScore(dbMap.MD5, clanId)

if err != nil && err != gorm.ErrRecordNotFound {
Expand Down

0 comments on commit 9385bcb

Please sign in to comment.