Skip to content

Commit bacbe3f

Browse files
authored
Entitlements Get API filter by status
1 parent 5436d88 commit bacbe3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/mock_api/endpoints/drops/entitlements.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func getEntitlements(w http.ResponseWriter, r *http.Request) {
7070
id := r.URL.Query().Get("id")
7171
userID := r.URL.Query().Get("user_id")
7272
gameID := r.URL.Query().Get("game_id")
73+
status := r.URL.Query().Get("fulfillment_status")
7374

7475
if userCtx.UserID != "" && userID != "" {
7576
mock_errors.WriteBadRequest(w, "user_id is invalid when using user access token")
@@ -78,7 +79,7 @@ func getEntitlements(w http.ResponseWriter, r *http.Request) {
7879
if userCtx.UserID != "" {
7980
userID = userCtx.UserID
8081
}
81-
e := database.DropsEntitlement{UserID: userID, GameID: gameID, ID: id}
82+
e := database.DropsEntitlement{UserID: userID, GameID: gameID, ID: id, Status: status}
8283
dbr, err := db.NewQuery(r, 1000).GetDropsEntitlements(e)
8384
if err != nil {
8485
mock_errors.WriteServerError(w, "error fetching entitlements")

0 commit comments

Comments
 (0)