Compare commits

..

3 Commits

Author SHA1 Message Date
fea68a736f temp 2026-01-24 21:17:11 +08:00
a83dc1bf23 Merge branch 'main' of https://git.xiongxiao.me/abearxiong/test-convex 2026-01-24 17:02:05 +08:00
ce6bc3e48e temp 2026-01-24 17:01:39 +08:00
4 changed files with 16 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import type * as abcv from "../abcv.js";
import type * as actions_jwt from "../actions/jwt.js";
import type * as actions_redis from "../actions/redis.js";
import type * as http from "../http.js";
import type * as xiong from "../xiong.js";
import type {
ApiFromModules,
@@ -24,6 +25,7 @@ declare const fullApi: ApiFromModules<{
"actions/jwt": typeof actions_jwt;
"actions/redis": typeof actions_redis;
http: typeof http;
xiong: typeof xiong;
}>;
/**

View File

@@ -6,6 +6,10 @@ export default defineSchema({
abcv: defineTable({
title: v.string(),
}),
xiong: defineTable({
name: v.string(),
title: v.string(),
}),
users: defineTable({
id: v.string(), // 外部系统的用户 ID
name: v.string(),

8
convex/xiong.ts Normal file
View 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();
},
});

View File

@@ -53,6 +53,8 @@ console.log("Initial list:", list);
// }
// const list = await client.action(api.abcv.chat, { message: "Hello, 1+1=?" });
// 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, {});
// console.log("Redis isConnected:", redisIsConnected);
// const sign = await api.auth.signIn({ provider: "convex" })