mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
opened the tags endpoint to the apekey authentication
This commit is contained in:
parent
69071f6414
commit
10159702ff
|
@ -247,8 +247,10 @@ router.delete(
|
|||
|
||||
router.get(
|
||||
"/tags",
|
||||
authenticateRequest(),
|
||||
RateLimit.userTagsGet,
|
||||
authenticateRequest({
|
||||
acceptApeKeys: true,
|
||||
}),
|
||||
withApeRateLimiter(RateLimit.userTagsGet),
|
||||
asyncHandler(UserController.getTags)
|
||||
);
|
||||
|
||||
|
|
|
@ -72,6 +72,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/users/tags": {
|
||||
"get": {
|
||||
"tags": ["users"],
|
||||
"summary": "Gets a user's tags data",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Tags"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/:uid/profile": {
|
||||
"get": {
|
||||
"tags": ["users"],
|
||||
|
@ -457,6 +471,85 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"type": "string",
|
||||
"example": "63fde8d39312642481070f5d"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "example_tag"
|
||||
},
|
||||
"personalBests": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"time": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"15": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"30": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"60": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"120": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"words": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"10": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"25": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"50": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
},
|
||||
"100": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PersonalBest"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"LeaderboardEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
Loading…
Reference in a new issue