fix: memo import

This commit is contained in:
boojack
2022-05-21 12:42:28 +08:00
parent 7b668f17f5
commit c34cbb19bc
2 changed files with 4 additions and 6 deletions

View File

@ -129,12 +129,10 @@ const memoService = {
await api.unpinMemo(memoId);
},
importMemo: async (content: string, createdAt: string) => {
const createdTs = Math.floor(utils.getTimeStampByDate(createdAt) / 1000);
importMemo: async (content: string, createdTs: TimeStamp) => {
await api.createMemo({
content,
createdTs,
createdTs: Math.floor(utils.getTimeStampByDate(createdTs) / 1000),
});
},
};