19 lines
468 B
TypeScript
19 lines
468 B
TypeScript
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() |