feat: 添加 nCode 组件及相关 API,支持创建、查询、更新和删除操作
This commit is contained in:
19
test/get-list.ts
Normal file
19
test/get-list.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { client, api } from '../src/convex.ts'
|
||||
|
||||
|
||||
// client.query(api.nCode.getList, {}).then((res) => {
|
||||
// console.log('getList', res)
|
||||
// })
|
||||
|
||||
const createNCode = async () => {
|
||||
const res = await client.mutation(api.nCode.create, {
|
||||
code: Math.random().toString(36).substring(2, 8),
|
||||
type: "link",
|
||||
data: {},
|
||||
title: "测试码",
|
||||
description: "这是一个测试码",
|
||||
userId: "test-user-id",
|
||||
})
|
||||
console.log('createNCode', res)
|
||||
}
|
||||
createNCode()
|
||||
Reference in New Issue
Block a user