mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-05 09:10:26 +00:00
restore authURL
This commit is contained in:
parent
29f8d47369
commit
2f4ba4bf41
1 changed files with 10 additions and 0 deletions
|
@ -70,6 +70,16 @@ export class BaseAPI {
|
|||
this.attachmentToken = attachmentToken;
|
||||
}
|
||||
|
||||
// if a attachmentToken is present it will be added to URL as a query param
|
||||
// this is done with a simple appending of the query param to the URL. If your
|
||||
// URL already has a query param, this will not work.
|
||||
authURL(url: string): string {
|
||||
if (this.attachmentToken) {
|
||||
return `/api/v1${url}?access_token=${this.attachmentToken}`;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* dropFields will remove any fields that are specified in the fields array
|
||||
* additionally, it will remove the `createdAt` and `updatedAt` fields if they
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue