Compare commits
3 Commits
5657bffd39
...
fea68a736f
| Author | SHA1 | Date | |
|---|---|---|---|
| fea68a736f | |||
| a83dc1bf23 | |||
| ce6bc3e48e |
2
convex/_generated/api.d.ts
vendored
2
convex/_generated/api.d.ts
vendored
@@ -12,6 +12,7 @@ import type * as abcv from "../abcv.js";
|
|||||||
import type * as actions_jwt from "../actions/jwt.js";
|
import type * as actions_jwt from "../actions/jwt.js";
|
||||||
import type * as actions_redis from "../actions/redis.js";
|
import type * as actions_redis from "../actions/redis.js";
|
||||||
import type * as http from "../http.js";
|
import type * as http from "../http.js";
|
||||||
|
import type * as xiong from "../xiong.js";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ApiFromModules,
|
ApiFromModules,
|
||||||
@@ -24,6 +25,7 @@ declare const fullApi: ApiFromModules<{
|
|||||||
"actions/jwt": typeof actions_jwt;
|
"actions/jwt": typeof actions_jwt;
|
||||||
"actions/redis": typeof actions_redis;
|
"actions/redis": typeof actions_redis;
|
||||||
http: typeof http;
|
http: typeof http;
|
||||||
|
xiong: typeof xiong;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ export default defineSchema({
|
|||||||
abcv: defineTable({
|
abcv: defineTable({
|
||||||
title: v.string(),
|
title: v.string(),
|
||||||
}),
|
}),
|
||||||
|
xiong: defineTable({
|
||||||
|
name: v.string(),
|
||||||
|
title: v.string(),
|
||||||
|
}),
|
||||||
users: defineTable({
|
users: defineTable({
|
||||||
id: v.string(), // 外部系统的用户 ID
|
id: v.string(), // 外部系统的用户 ID
|
||||||
name: v.string(),
|
name: v.string(),
|
||||||
|
|||||||
8
convex/xiong.ts
Normal file
8
convex/xiong.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { query, mutation, action } from "./_generated/server";
|
||||||
|
|
||||||
|
export const get = query({
|
||||||
|
args: {},
|
||||||
|
handler: async (ctx) => {
|
||||||
|
return await ctx.db.query("xiong").collect();
|
||||||
|
},
|
||||||
|
});
|
||||||
2
index.ts
2
index.ts
@@ -53,6 +53,8 @@ console.log("Initial list:", list);
|
|||||||
// }
|
// }
|
||||||
// const list = await client.action(api.abcv.chat, { message: "Hello, 1+1=?" });
|
// const list = await client.action(api.abcv.chat, { message: "Hello, 1+1=?" });
|
||||||
// console.log("Chat response:", list);
|
// console.log("Chat response:", list);
|
||||||
|
const xiongList = await client.query(api.xiong.get, {});
|
||||||
|
console.log("Xiong list:", xiongList);
|
||||||
// const redisIsConnected = await client.action(api.actions.redis.isConnected, {});
|
// const redisIsConnected = await client.action(api.actions.redis.isConnected, {});
|
||||||
// console.log("Redis isConnected:", redisIsConnected);
|
// console.log("Redis isConnected:", redisIsConnected);
|
||||||
// const sign = await api.auth.signIn({ provider: "convex" })
|
// const sign = await api.auth.signIn({ provider: "convex" })
|
||||||
|
|||||||
Reference in New Issue
Block a user