(userId: string, parentFilePath: string)
| 482 | } |
| 483 | |
| 484 | static async getByParentFilePath(userId: string, parentFilePath: string): Promise<FileShare[]> { |
| 485 | const fileShares = await db.query<FileShare>( |
| 486 | sql`SELECT * FROM "bewcloud_file_shares" WHERE "user_id" = $1 AND "file_path" LIKE $2`, |
| 487 | [userId, `${parentFilePath}%`], |
| 488 | ); |
| 489 | |
| 490 | return fileShares; |
| 491 | } |
| 492 | |
| 493 | static async create(fileShare: Omit<FileShare, 'id' | 'created_at'>): Promise<FileShare> { |
| 494 | const newFileShare = (await db.query<FileShare>( |
no outgoing calls
no test coverage detected