refactor: collection controllers and service

This commit is contained in:
Sonny
2025-08-07 19:42:05 +02:00
parent a5ddc9eb55
commit 56b52adac0
15 changed files with 314 additions and 164 deletions

View File

@@ -34,3 +34,11 @@ export const generateShareUrl = (
if (typeof window === 'undefined') return pathname;
return `${window.location.origin}${pathname}`;
};
export const buildUrl = (url: string, params: Record<string, string>) => {
const urlObj = new URL(url);
Object.entries(params).forEach(([key, value]) => {
urlObj.searchParams.set(key, value);
});
return urlObj.toString();
};