`` refactor GetUserById function and add Create/UpdateUser APIs with type definitions ``

This commit is contained in:
louiscklaw
2025-05-15 09:26:36 +08:00
parent d4fcc1dd8f
commit 160c93b83d
5 changed files with 35 additions and 13 deletions

View File

@@ -21,9 +21,12 @@ the `@` sign refer to `/home/logic/_wsl_workspace/001_github_ws/lettersoup-onlin
simple template:
```typescript
import { pb } from '@/lib/pb';
import { COL_USERS } from '@/constants';
import { pb } from '@/lib/pb';
import type { User } from './type.d';
export async function createUser(data: CreateFormProps) {
// ...content
// use direct return of pb.collection (e.g. return pb.collection(xxx))