chore: use shortcut v2 api

This commit is contained in:
Steven
2023-11-21 23:33:34 +08:00
parent c449669793
commit 61b167ef66
32 changed files with 515 additions and 724 deletions

View File

@@ -1,15 +0,0 @@
import { Shortcut as ShortcutPb } from "@/types/proto/api/v2/shortcut_service";
export const convertShortcutFromPb = (shortcutMessage: ShortcutPb): Shortcut => {
return {
id: shortcutMessage.id,
creatorId: shortcutMessage.creatorId,
createdTs: shortcutMessage.createdTime?.getTime() || 0,
updatedTs: shortcutMessage.updatedTime?.getTime() || 0,
name: shortcutMessage.name,
link: shortcutMessage.link,
title: shortcutMessage.title,
description: shortcutMessage.description,
tags: shortcutMessage.tags,
} as Shortcut;
};