feat: implement shortcut view analytics

This commit is contained in:
Steven
2023-07-10 22:57:29 +08:00
parent d866d5b53b
commit 0cceed51f8
9 changed files with 308 additions and 7 deletions

View File

@@ -59,6 +59,10 @@ export function createShortcut(shortcutCreate: ShortcutCreate) {
return axios.post<Shortcut>("/api/v1/shortcut", shortcutCreate);
}
export function getShortcutAnalytics(shortcutId: ShortcutId) {
return axios.get<AnalysisData>(`/api/v1/shortcut/${shortcutId}/analytics`);
}
export function patchShortcut(shortcutPatch: ShortcutPatch) {
return axios.patch<Shortcut>(`/api/v1/shortcut/${shortcutPatch.id}`, shortcutPatch);
}