rhythia-api 181.0.0 → 182.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.
@@ -12,6 +12,7 @@ export const Schema = {
12
12
  collection: z.number(),
13
13
  title: z.string(),
14
14
  description: z.string(),
15
+ isList: z.boolean(),
15
16
  }),
16
17
  output: z.object({
17
18
  error: z.string().optional(),
@@ -69,6 +70,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
69
70
  id: data.collection,
70
71
  title: data.title,
71
72
  description: data.description,
73
+ is_list: data.isList,
72
74
  owner: queryUserData.id,
73
75
  });
74
76
  return NextResponse.json({});
@@ -16,6 +16,7 @@ export const Schema = {
16
16
  id: z.number(),
17
17
  username: z.string(),
18
18
  }),
19
+ isList: z.boolean(),
19
20
  beatmaps: z.array(
20
21
  z.object({
21
22
  id: z.number(),
@@ -120,6 +121,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
120
121
  username: queryCollectionData.profiles.username,
121
122
  id: queryCollectionData.profiles.id,
122
123
  },
124
+ isList: queryCollectionData.is_list,
123
125
  title: queryCollectionData.title,
124
126
  description: queryCollectionData.description,
125
127
  beatmaps: formattedBeatmaps,
@@ -135,7 +135,7 @@ export async function handler(data: (typeof Schema)["input"]["_type"]) {
135
135
 
136
136
  const countChart = await supabase
137
137
  .from("chartedValues")
138
- .select("*")
138
+ .select("value")
139
139
  .eq("type", "online_players")
140
140
  .gt("created_at", new Date(Date.now() - 86400000).toISOString());
141
141
 
package/index.ts CHANGED
@@ -208,6 +208,7 @@ export const Schema = {
208
208
  collection: z.number(),
209
209
  title: z.string(),
210
210
  description: z.string(),
211
+ isList: z.boolean(),
211
212
  }),
212
213
  output: z.object({
213
214
  error: z.string().optional(),
@@ -515,6 +516,7 @@ export const Schema = {
515
516
  id: z.number(),
516
517
  username: z.string(),
517
518
  }),
519
+ isList: z.boolean(),
518
520
  beatmaps: z.array(
519
521
  z.object({
520
522
  id: z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rhythia-api",
3
- "version": "181.0.0",
3
+ "version": "182.0.0",
4
4
  "main": "index.ts",
5
5
  "author": "online-contributors",
6
6
  "scripts": {
package/types/database.ts CHANGED
@@ -14,6 +14,7 @@ export type Database = {
14
14
  created_at: string
15
15
  description: string
16
16
  id: number
17
+ is_list: boolean
17
18
  owner: number
18
19
  title: string
19
20
  }
@@ -21,6 +22,7 @@ export type Database = {
21
22
  created_at?: string
22
23
  description: string
23
24
  id?: number
25
+ is_list?: boolean
24
26
  owner: number
25
27
  title: string
26
28
  }
@@ -28,6 +30,7 @@ export type Database = {
28
30
  created_at?: string
29
31
  description?: string
30
32
  id?: number
33
+ is_list?: boolean
31
34
  owner?: number
32
35
  title?: string
33
36
  }