diff --git a/docs/docs/tips-tricks.md b/docs/docs/tips-tricks.md index d5c1207..f2200c3 100644 --- a/docs/docs/tips-tricks.md +++ b/docs/docs/tips-tricks.md @@ -39,7 +39,7 @@ In some cases you may want to skip some items such as consumables, or items that Homebox has a built-in QR code generator that can be used to generate QR codes for your items. This is useful for tracking items with a mobile device. You can generate a QR code for any item by clicking the QR code icon in the top right of the item details page. The same can be done for the Labels and Locations page. Currently support is limited to generating one off QR Codes. -However, the API endpoint is available for generating QR codes on the fly for any item (or any other data) if you provide a valid API key in the query parameters. An example url would look like `/api/v1/qrcode?data=https://homebox.fly.dev/item/{uuid}&access_token={api_key}`. Currently the easiest way to get an API token is to use one from an existing URL of the QR Code in the API key, but this will be improved in the future. +However, the API endpoint is available for generating QR codes on the fly for any item (or any other data) if you provide a valid API key in the query parameters. An example url would look like `/api/v1/qrcode?data=https://homebox.fly.dev/item/{uuid}`. Currently the easiest way to get an API token is to use one from an existing URL of the QR Code in the API key, but this will be improved in the future. :octicons-tag-24: v0.8.0 diff --git a/frontend/lib/api/base/base-api.ts b/frontend/lib/api/base/base-api.ts index 3847a4b..13b4269 100644 --- a/frontend/lib/api/base/base-api.ts +++ b/frontend/lib/api/base/base-api.ts @@ -70,16 +70,6 @@ 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 diff --git a/frontend/pages/reports/label-generator.vue b/frontend/pages/reports/label-generator.vue index 0976be9..db74864 100644 --- a/frontend/pages/reports/label-generator.vue +++ b/frontend/pages/reports/label-generator.vue @@ -178,7 +178,7 @@ const data = `${origin}/a/${assetID}`; - return `/api/v1/qrcode?data=${encodeURIComponent(data)}&access_token=${api.items.attachmentToken}`; + return `/api/v1/qrcode?data=${encodeURIComponent(data)}`; } function getItem(n: number): LabelData {