Skip to content

Commit 9385bcb

Browse files
authored
Merge pull request #138 from Quaver/remove-dono-clans
Remote donator requirement for clans
2 parents cef5e57 + aa8c8b6 commit 9385bcb

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

handlers/clan_scores.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package handlers
22

33
import (
4+
"net/http"
5+
"strconv"
6+
47
"github.com/Quaver/api2/db"
58
"github.com/Quaver/api2/enums"
69
"github.com/gin-gonic/gin"
710
"gorm.io/gorm"
8-
"net/http"
9-
"strconv"
1011
)
1112

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

81-
if !hasDonatorScoreboardAccess(dbMap, getAuthedUser(c)) {
82-
return APIErrorForbidden("You must be a donator to access this score.")
83-
}
84-
8582
clanScores, err := db.GetClanScoreboardForMap(dbMap.MD5)
8683

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

110-
if !hasDonatorScoreboardAccess(dbMap, getAuthedUser(c)) {
111-
return APIErrorForbidden("You must be a donator to access this score.")
112-
}
113-
114107
clanScore, err := db.GetClanScore(dbMap.MD5, clanId)
115108

116109
if err != nil && err != gorm.ErrRecordNotFound {

0 commit comments

Comments
 (0)