mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-07-01 02:05:33 +02:00
revert shitty layout, use cdn for vendors (new ones coming soon)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { LprVendor } from "@/types";
|
||||
import axios from "axios";
|
||||
|
||||
export interface Chapter {
|
||||
@@ -32,5 +33,14 @@ export const cmsService = {
|
||||
console.error("Error fetching chapters:", error);
|
||||
throw new Error("Failed to fetch chapters");
|
||||
}
|
||||
},
|
||||
async getLprVendors(): Promise<LprVendor[]> {
|
||||
try {
|
||||
const response = await cmsApiService.get("/items/lprVendors");
|
||||
return response.data.data as LprVendor[];
|
||||
} catch (error) {
|
||||
console.error("Error fetching LPR vendors:", error);
|
||||
throw new Error("Failed to fetch LPR vendors");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { lprBaseTags } from "@/constants";
|
||||
|
||||
export function createDeflockProfileUrl(obj: Record<string, string>): string {
|
||||
const tags = { ...lprBaseTags, ...obj };
|
||||
const payload = btoa(JSON.stringify(tags));
|
||||
return `deflockapp://profiles/add?p=${payload}`;
|
||||
}
|
||||
Reference in New Issue
Block a user