rhythia-api 145.0.0 → 146.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/index.ts +24 -24
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -72,7 +72,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
return NextResponse.json({});
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
import { Schema as ApproveMap } from "./api/approveMap"
|
|
77
77
|
export { Schema as SchemaApproveMap } from "./api/approveMap"
|
|
78
78
|
export const approveMap = handleApi({url:"/api/approveMap",...ApproveMap})
|
|
@@ -193,7 +193,7 @@ export async function handler({
|
|
|
193
193
|
return NextResponse.json({ error: upserted.error.message });
|
|
194
194
|
}
|
|
195
195
|
return NextResponse.json({ hash: digested });
|
|
196
|
-
}
|
|
196
|
+
}
|
|
197
197
|
import { Schema as CreateBeatmap } from "./api/createBeatmap"
|
|
198
198
|
export { Schema as SchemaCreateBeatmap } from "./api/createBeatmap"
|
|
199
199
|
export const createBeatmap = handleApi({url:"/api/createBeatmap",...CreateBeatmap})
|
|
@@ -256,7 +256,7 @@ export async function handler({
|
|
|
256
256
|
.select("*")
|
|
257
257
|
.single();
|
|
258
258
|
return NextResponse.json({ id: upserted.data?.id });
|
|
259
|
-
}
|
|
259
|
+
}
|
|
260
260
|
import { Schema as CreateBeatmapPage } from "./api/createBeatmapPage"
|
|
261
261
|
export { Schema as SchemaCreateBeatmapPage } from "./api/createBeatmapPage"
|
|
262
262
|
export const createBeatmapPage = handleApi({url:"/api/createBeatmapPage",...CreateBeatmapPage})
|
|
@@ -327,7 +327,7 @@ export async function handler({
|
|
|
327
327
|
.eq("beatmapHash", beatmapData.beatmapHash);
|
|
328
328
|
|
|
329
329
|
return NextResponse.json({});
|
|
330
|
-
}
|
|
330
|
+
}
|
|
331
331
|
import { Schema as DeleteBeatmapPage } from "./api/deleteBeatmapPage"
|
|
332
332
|
export { Schema as SchemaDeleteBeatmapPage } from "./api/deleteBeatmapPage"
|
|
333
333
|
export const deleteBeatmapPage = handleApi({url:"/api/deleteBeatmapPage",...DeleteBeatmapPage})
|
|
@@ -418,7 +418,7 @@ export async function handler(
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
return NextResponse.json({});
|
|
421
|
-
}
|
|
421
|
+
}
|
|
422
422
|
import { Schema as EditAboutMe } from "./api/editAboutMe"
|
|
423
423
|
export { Schema as SchemaEditAboutMe } from "./api/editAboutMe"
|
|
424
424
|
export const editAboutMe = handleApi({url:"/api/editAboutMe",...EditAboutMe})
|
|
@@ -526,7 +526,7 @@ export async function handler(
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
return NextResponse.json({});
|
|
529
|
-
}
|
|
529
|
+
}
|
|
530
530
|
import { Schema as EditProfile } from "./api/editProfile"
|
|
531
531
|
export { Schema as SchemaEditProfile } from "./api/editProfile"
|
|
532
532
|
export const editProfile = handleApi({url:"/api/editProfile",...EditProfile})
|
|
@@ -594,7 +594,7 @@ export async function handler({
|
|
|
594
594
|
url: presigned,
|
|
595
595
|
objectKey: key,
|
|
596
596
|
});
|
|
597
|
-
}
|
|
597
|
+
}
|
|
598
598
|
import { Schema as GetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
|
|
599
599
|
export { Schema as SchemaGetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
|
|
600
600
|
export const getAvatarUploadUrl = handleApi({url:"/api/getAvatarUploadUrl",...GetAvatarUploadUrl})
|
|
@@ -652,7 +652,7 @@ export async function getLeaderboard(badge: string) {
|
|
|
652
652
|
username: user.username,
|
|
653
653
|
})),
|
|
654
654
|
};
|
|
655
|
-
}
|
|
655
|
+
}
|
|
656
656
|
import { Schema as GetBadgedUsers } from "./api/getBadgedUsers"
|
|
657
657
|
export { Schema as SchemaGetBadgedUsers } from "./api/getBadgedUsers"
|
|
658
658
|
export const getBadgedUsers = handleApi({url:"/api/getBadgedUsers",...GetBadgedUsers})
|
|
@@ -711,7 +711,7 @@ export async function handler({
|
|
|
711
711
|
.eq("beatmapPage", page);
|
|
712
712
|
|
|
713
713
|
return NextResponse.json({ comments: userData! });
|
|
714
|
-
}
|
|
714
|
+
}
|
|
715
715
|
import { Schema as GetBeatmapComments } from "./api/getBeatmapComments"
|
|
716
716
|
export { Schema as SchemaGetBeatmapComments } from "./api/getBeatmapComments"
|
|
717
717
|
export const getBeatmapComments = handleApi({url:"/api/getBeatmapComments",...GetBeatmapComments})
|
|
@@ -810,7 +810,7 @@ export async function handler(
|
|
|
810
810
|
nominations: beatmapPage.nominations as number[],
|
|
811
811
|
},
|
|
812
812
|
});
|
|
813
|
-
}
|
|
813
|
+
}
|
|
814
814
|
import { Schema as GetBeatmapPage } from "./api/getBeatmapPage"
|
|
815
815
|
export { Schema as SchemaGetBeatmapPage } from "./api/getBeatmapPage"
|
|
816
816
|
export const getBeatmapPage = handleApi({url:"/api/getBeatmapPage",...GetBeatmapPage})
|
|
@@ -909,7 +909,7 @@ export async function handler(
|
|
|
909
909
|
nominations: beatmapPage.nominations as number[],
|
|
910
910
|
},
|
|
911
911
|
});
|
|
912
|
-
}
|
|
912
|
+
}
|
|
913
913
|
import { Schema as GetBeatmapPageById } from "./api/getBeatmapPageById"
|
|
914
914
|
export { Schema as SchemaGetBeatmapPageById } from "./api/getBeatmapPageById"
|
|
915
915
|
export const getBeatmapPageById = handleApi({url:"/api/getBeatmapPageById",...GetBeatmapPageById})
|
|
@@ -1070,7 +1070,7 @@ export async function getBeatmaps(data: (typeof Schema)["input"]["_type"]) {
|
|
|
1070
1070
|
ownerUsername: beatmapPage.profiles?.username,
|
|
1071
1071
|
})),
|
|
1072
1072
|
};
|
|
1073
|
-
}
|
|
1073
|
+
}
|
|
1074
1074
|
import { Schema as GetBeatmaps } from "./api/getBeatmaps"
|
|
1075
1075
|
export { Schema as SchemaGetBeatmaps } from "./api/getBeatmaps"
|
|
1076
1076
|
export const getBeatmaps = handleApi({url:"/api/getBeatmaps",...GetBeatmaps})
|
|
@@ -1172,7 +1172,7 @@ export async function getLeaderboard(page = 1, session: string) {
|
|
|
1172
1172
|
username: user.username,
|
|
1173
1173
|
})),
|
|
1174
1174
|
};
|
|
1175
|
-
}
|
|
1175
|
+
}
|
|
1176
1176
|
import { Schema as GetLeaderboard } from "./api/getLeaderboard"
|
|
1177
1177
|
export { Schema as SchemaGetLeaderboard } from "./api/getLeaderboard"
|
|
1178
1178
|
export const getLeaderboard = handleApi({url:"/api/getLeaderboard",...GetLeaderboard})
|
|
@@ -1248,7 +1248,7 @@ export async function handler({
|
|
|
1248
1248
|
url: presigned,
|
|
1249
1249
|
objectKey: key,
|
|
1250
1250
|
});
|
|
1251
|
-
}
|
|
1251
|
+
}
|
|
1252
1252
|
import { Schema as GetMapUploadUrl } from "./api/getMapUploadUrl"
|
|
1253
1253
|
export { Schema as SchemaGetMapUploadUrl } from "./api/getMapUploadUrl"
|
|
1254
1254
|
export const getMapUploadUrl = handleApi({url:"/api/getMapUploadUrl",...GetMapUploadUrl})
|
|
@@ -1374,7 +1374,7 @@ export async function handler(
|
|
|
1374
1374
|
position: (playersWithMorePoints || 0) + 1,
|
|
1375
1375
|
},
|
|
1376
1376
|
});
|
|
1377
|
-
}
|
|
1377
|
+
}
|
|
1378
1378
|
import { Schema as GetProfile } from "./api/getProfile"
|
|
1379
1379
|
export { Schema as SchemaGetProfile } from "./api/getProfile"
|
|
1380
1380
|
export const getProfile = handleApi({url:"/api/getProfile",...GetProfile})
|
|
@@ -1418,7 +1418,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
|
|
|
1418
1418
|
profiles: countProfilesQuery.count,
|
|
1419
1419
|
scores: countScoresQuery.count,
|
|
1420
1420
|
});
|
|
1421
|
-
}
|
|
1421
|
+
}
|
|
1422
1422
|
import { Schema as GetPublicStats } from "./api/getPublicStats"
|
|
1423
1423
|
export { Schema as SchemaGetPublicStats } from "./api/getPublicStats"
|
|
1424
1424
|
export const getPublicStats = handleApi({url:"/api/getPublicStats",...GetPublicStats})
|
|
@@ -1503,7 +1503,7 @@ export async function handler(
|
|
|
1503
1503
|
speed: score.speed,
|
|
1504
1504
|
},
|
|
1505
1505
|
});
|
|
1506
|
-
}
|
|
1506
|
+
}
|
|
1507
1507
|
import { Schema as GetScore } from "./api/getScore"
|
|
1508
1508
|
export { Schema as SchemaGetScore } from "./api/getScore"
|
|
1509
1509
|
export const getScore = handleApi({url:"/api/getScore",...GetScore})
|
|
@@ -1656,7 +1656,7 @@ export async function handler(
|
|
|
1656
1656
|
speed: s.speed,
|
|
1657
1657
|
})),
|
|
1658
1658
|
});
|
|
1659
|
-
}
|
|
1659
|
+
}
|
|
1660
1660
|
import { Schema as GetUserScores } from "./api/getUserScores"
|
|
1661
1661
|
export { Schema as SchemaGetUserScores } from "./api/getUserScores"
|
|
1662
1662
|
export const getUserScores = handleApi({url:"/api/getUserScores",...GetUserScores})
|
|
@@ -1725,7 +1725,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
|
|
|
1725
1725
|
});
|
|
1726
1726
|
|
|
1727
1727
|
return NextResponse.json({});
|
|
1728
|
-
}
|
|
1728
|
+
}
|
|
1729
1729
|
import { Schema as NominateMap } from "./api/nominateMap"
|
|
1730
1730
|
export { Schema as SchemaNominateMap } from "./api/nominateMap"
|
|
1731
1731
|
export const nominateMap = handleApi({url:"/api/nominateMap",...NominateMap})
|
|
@@ -1783,7 +1783,7 @@ export async function handler({
|
|
|
1783
1783
|
return NextResponse.json({ error: upserted.error.message });
|
|
1784
1784
|
}
|
|
1785
1785
|
return NextResponse.json({});
|
|
1786
|
-
}
|
|
1786
|
+
}
|
|
1787
1787
|
import { Schema as PostBeatmapComment } from "./api/postBeatmapComment"
|
|
1788
1788
|
export { Schema as SchemaPostBeatmapComment } from "./api/postBeatmapComment"
|
|
1789
1789
|
export const postBeatmapComment = handleApi({url:"/api/postBeatmapComment",...PostBeatmapComment})
|
|
@@ -1847,7 +1847,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
|
|
1849
1849
|
return NextResponse.json({});
|
|
1850
|
-
}
|
|
1850
|
+
}
|
|
1851
1851
|
import { Schema as RankMapsArchive } from "./api/rankMapsArchive"
|
|
1852
1852
|
export { Schema as SchemaRankMapsArchive } from "./api/rankMapsArchive"
|
|
1853
1853
|
export const rankMapsArchive = handleApi({url:"/api/rankMapsArchive",...RankMapsArchive})
|
|
@@ -1891,7 +1891,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
|
|
|
1891
1891
|
return NextResponse.json({
|
|
1892
1892
|
results: searchData || [],
|
|
1893
1893
|
});
|
|
1894
|
-
}
|
|
1894
|
+
}
|
|
1895
1895
|
import { Schema as SearchUsers } from "./api/searchUsers"
|
|
1896
1896
|
export { Schema as SchemaSearchUsers } from "./api/searchUsers"
|
|
1897
1897
|
export const searchUsers = handleApi({url:"/api/searchUsers",...SearchUsers})
|
|
@@ -2097,7 +2097,7 @@ export async function handler({
|
|
|
2097
2097
|
console.log("p3");
|
|
2098
2098
|
|
|
2099
2099
|
return NextResponse.json({});
|
|
2100
|
-
}
|
|
2100
|
+
}
|
|
2101
2101
|
import { Schema as SubmitScore } from "./api/submitScore"
|
|
2102
2102
|
export { Schema as SchemaSubmitScore } from "./api/submitScore"
|
|
2103
2103
|
export const submitScore = handleApi({url:"/api/submitScore",...SubmitScore})
|
|
@@ -2184,7 +2184,7 @@ export async function handler({
|
|
|
2184
2184
|
return NextResponse.json({ error: upserted.error.message });
|
|
2185
2185
|
}
|
|
2186
2186
|
return NextResponse.json({});
|
|
2187
|
-
}
|
|
2187
|
+
}
|
|
2188
2188
|
import { Schema as UpdateBeatmapPage } from "./api/updateBeatmapPage"
|
|
2189
2189
|
export { Schema as SchemaUpdateBeatmapPage } from "./api/updateBeatmapPage"
|
|
2190
2190
|
export const updateBeatmapPage = handleApi({url:"/api/updateBeatmapPage",...UpdateBeatmapPage})
|