mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-09-13 05:45:28 -05:00
Use Splatoon 3 presence data from custom presence URLs
This commit is contained in:
@@ -97,13 +97,13 @@ export enum RequestId {
|
||||
VsHistoryDetailQuery = 'cd82f2ade8aca7687947c5f3210805a6',
|
||||
}
|
||||
|
||||
interface NodeList<T, C extends boolean = false> {
|
||||
interface _NodeList<T, C extends boolean = false> {
|
||||
nodes: T[];
|
||||
totalCount: C extends true ? number : never;
|
||||
}
|
||||
interface NodeListTotal {
|
||||
totalCount: number;
|
||||
}
|
||||
type NodeList<T, C extends boolean = false> =
|
||||
C extends true ? _NodeList<T> : Pick<_NodeList<T>, 'nodes'>;
|
||||
type NodeListTotal = Pick<_NodeList<unknown>, 'totalCount'>;
|
||||
|
||||
interface Colour {
|
||||
a: number;
|
||||
|
||||
@@ -239,5 +239,5 @@ export async function getPresenceFromUrl(presence_url: string, useragent?: strin
|
||||
throw new Error('Invalid presence data');
|
||||
}
|
||||
|
||||
return [presence, user] as const;
|
||||
return defineResponse([presence, user, data as unknown] as const, response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user