@zodic/shared 0.0.66 → 0.0.68

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/app/api/index.ts CHANGED
@@ -539,11 +539,12 @@ export const Api = (env: BackendBindings) => ({
539
539
  callTimezone: async ({
540
540
  lat,
541
541
  lon,
542
+ timestamp,
542
543
  }: {
543
544
  lat: number;
544
545
  lon: number;
546
+ timestamp: number;
545
547
  }): Promise<number> => {
546
- const timestamp = Math.floor(Date.now() / 1000);
547
548
  const url = `https://maps.googleapis.com/maps/api/timezone/json?location=${lat},${lon}&timestamp=${timestamp}&key=${env.GOOGLE_TIMEZONE_API_KEY}`;
548
549
 
549
550
  try {
@@ -0,0 +1,22 @@
1
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
+ CREATE TABLE `__new_astro_planets` (
3
+ `id` text PRIMARY KEY NOT NULL,
4
+ `user_id` text NOT NULL,
5
+ `type` text NOT NULL,
6
+ `name` text NOT NULL,
7
+ `sign` text NOT NULL,
8
+ `house` integer,
9
+ `full_degree` real,
10
+ `norm_degree` real,
11
+ `speed` real,
12
+ `is_retro` integer,
13
+ `sign_report` text,
14
+ `house_report` text,
15
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
16
+ );
17
+ --> statement-breakpoint
18
+ INSERT INTO `__new_astro_planets`("id", "user_id", "type", "name", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro", "sign_report", "house_report") SELECT "id", "user_id", "type", "name", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro", "sign_report", "house_report" FROM `astro_planets`;--> statement-breakpoint
19
+ DROP TABLE `astro_planets`;--> statement-breakpoint
20
+ ALTER TABLE `__new_astro_planets` RENAME TO `astro_planets`;--> statement-breakpoint
21
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
22
+ CREATE INDEX `astro_planets_user_id_idx` ON `astro_planets` (`user_id`);