rhythia-api 57.0.0 → 59.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.
package/api/editUser.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import z from "zod";
2
2
 
3
3
  export const Schema = {
4
- url: "/api/editUser",
5
4
  input: z.object({
6
5
  name: z.string(),
7
6
  age: z.number(),
@@ -1,11 +1,6 @@
1
1
  import { createClient } from "@supabase/supabase-js";
2
2
  import { Database } from "../types/supabase";
3
3
 
4
- export async function webhook_createUser(input: { type: string }) {
5
- const request = await fetch(`https://rhythia.com/api/webhook_createUser`);
6
- return request.json();
7
- }
8
-
9
4
  const adminClient = createClient<Database>(
10
5
  `https://pfkajngbllcbdzoylrvp.supabase.co`,
11
6
  process.env.ADMIN_KEY!,
@@ -17,11 +12,6 @@ const adminClient = createClient<Database>(
17
12
  }
18
13
  );
19
14
 
20
- export function GET(request: Request) {
21
- const country = request.headers.get("x-vercel-ip-country");
22
- return new Response(`You're visiting from beautiful ${country}`);
23
- }
24
-
25
15
  export async function POST(request: Request) {
26
16
  const payload: any = await request.json();
27
17
 
package/index.ts CHANGED
@@ -1,10 +1,5 @@
1
1
  import { handleApi } from "./handleApi"
2
2
 
3
- // ./api/createUser.ts API
4
- import { Schema as CreateUser } from "./api/createUser"
5
- export { Schema as SchemaCreateUser } from "./api/createUser"
6
- export const createUser = handleApi({url:"/api/createUser",...CreateUser})
7
-
8
3
  // ./api/editUser.ts API
9
4
  import { Schema as EditUser } from "./api/editUser"
10
5
  export { Schema as SchemaEditUser } from "./api/editUser"