rhythia-api 118.0.0 → 119.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/getBeatmaps.ts +5 -0
- package/package.json +1 -1
package/api/getBeatmaps.ts
CHANGED
|
@@ -10,6 +10,7 @@ export const Schema = {
|
|
|
10
10
|
page: z.number().default(1),
|
|
11
11
|
maxStars: z.number().optional(),
|
|
12
12
|
minStars: z.number().optional(),
|
|
13
|
+
creator: z.string().optional(),
|
|
13
14
|
status: z.string().optional(),
|
|
14
15
|
}),
|
|
15
16
|
output: z.object({
|
|
@@ -104,6 +105,10 @@ export async function getBeatmaps(data: (typeof Schema)["input"]["_type"]) {
|
|
|
104
105
|
qry = qry.eq("status", data.status);
|
|
105
106
|
}
|
|
106
107
|
|
|
108
|
+
if (data.creator) {
|
|
109
|
+
qry = qry.eq("creator", data.creator);
|
|
110
|
+
}
|
|
111
|
+
|
|
107
112
|
let queryData = await qry.range(startPage, endPage);
|
|
108
113
|
|
|
109
114
|
return {
|