@lcas58/esmi-api-types 1.0.14 → 1.0.16

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.
@@ -28,9 +28,16 @@ export const list = async (c) => {
28
28
  whereConditions.push(gte(event.startsAt, from));
29
29
  whereConditions.push(lte(event.startsAt, to));
30
30
  // City/state → locationIds → events
31
- if (city && state) {
31
+ if (city || state) {
32
+ const locationConditions = [];
33
+ if (city) {
34
+ locationConditions.push(eq(location.city, city));
35
+ }
36
+ if (state) {
37
+ locationConditions.push(eq(location.state, state));
38
+ }
32
39
  const locations = await db.query.location.findMany({
33
- where: and(eq(location.city, city), eq(location.state, state)),
40
+ where: and(...locationConditions),
34
41
  columns: { id: true },
35
42
  limit: 1000,
36
43
  });
@@ -2,5 +2,6 @@ import type events from "../routes/events/events.index.js";
2
2
  import type index from "../routes/index.route.js";
3
3
  import type marketing from "../routes/marketing/marketing.index.js";
4
4
  import type sports from "../routes/sports/sports.index.js";
5
+ import type users from "../routes/users/users.index.js";
5
6
  import type webhooks from "../routes/webhooks/webhooks.index.js";
6
- export type AppType = typeof index | typeof events | typeof sports | typeof marketing | typeof webhooks;
7
+ export type AppType = typeof index | typeof events | typeof sports | typeof users | typeof marketing | typeof webhooks;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lcas58/esmi-api-types",
3
3
  "type": "module",
4
- "version": "1.0.14",
4
+ "version": "1.0.16",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {