mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
feat: show miis on profiles
and other changes
This commit is contained in:
parent
9795849830
commit
896dc40553
17 changed files with 271 additions and 408 deletions
|
|
@ -9,7 +9,7 @@ export async function GET(request: NextRequest) {
|
|||
const parsed = searchSchema.safeParse(Object.fromEntries(request.nextUrl.searchParams));
|
||||
if (!parsed.success) return NextResponse.json({ error: parsed.error.issues[0].message }, { status: 400 });
|
||||
|
||||
const { q: query, sort, tags, exclude, platform, gender, makeup, allowCopying, quarantined, page = 1, limit = 24, seed, parentPage, userId } = parsed.data;
|
||||
const { q: query, sort, tags, exclude, platform, gender, makeup, allowCopying, quarantined, page = 1, limit = 24, parentPage, userId } = parsed.data;
|
||||
|
||||
// My Likes page
|
||||
let miiIdsLiked: number[] | undefined = undefined;
|
||||
|
|
@ -107,7 +107,7 @@ export async function GET(request: NextRequest) {
|
|||
}
|
||||
|
||||
[totalCount, miis] = await Promise.all([
|
||||
prisma.mii.count({ where: { ...where } }), // TODO: User id
|
||||
prisma.mii.count({ where: { ...where, userId } }),
|
||||
prisma.mii.findMany({
|
||||
where,
|
||||
orderBy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue