mirror of
https://github.com/hay-kot/homebox.git
synced 2025-05-23 13:52:26 +00:00
feat: add lookup by asset ID (#208)
* add asset id redirecting * dev env changes * suggested changes from PR * remove unnecessary proxy from nuxt config * fix formatting * change directory reference * fix API key storage * use /a/{id} as redirect * run generators * remove dependabot Co-authored-by: Bradley Nelson <bradley@nel.family> Co-authored-by: Bradley Nelson <BCNelson@users.noreply.github.com>
This commit is contained in:
parent
c78f10ba5d
commit
07441eec8e
14 changed files with 302 additions and 33 deletions
11
frontend/lib/api/classes/assets.ts
Normal file
11
frontend/lib/api/classes/assets.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { BaseAPI, route } from "../base";
|
||||
import { ItemSummary } from "../types/data-contracts";
|
||||
import { PaginationResult } from "../types/non-generated";
|
||||
|
||||
export class AssetsApi extends BaseAPI {
|
||||
async get(id: string, page = 1, pageSize = 50) {
|
||||
return await this.http.get<PaginationResult<ItemSummary>>({
|
||||
url: route(`/asset/${id}`, { page, pageSize }),
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue