mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-25 06:14:25 +00:00
chore: use shortcut v2 api
This commit is contained in:
@@ -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;
|
||||
};
|
Reference in New Issue
Block a user