refactor getImageUrlFromFile to use Pocketbase records and correct path in teachers routes
```
This commit is contained in:
louiscklaw
2025-05-15 11:10:12 +08:00
parent 2aa96eec62
commit 7f8f8824a7
2 changed files with 8 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
export default function getImageUrlFromFile(collectionId: string, id: string, catImage: string): string {
return `http://127.0.0.1:8090/api/files/${collectionId}/${id}/${catImage}`;
//
// PURPOSE:
// get file url from pocketbase record
//
export default function getImageUrlFromFile(collectionId: string, id: string, imgFile: string): string {
return `http://127.0.0.1:8090/api/files/${collectionId}/${id}/${imgFile}`;
}