Skip to content

Commit

Permalink
fix: compatible with new version memos resource api
Browse files Browse the repository at this point in the history
  • Loading branch information
linyibing committed Apr 3, 2024
1 parent 831e8f4 commit 5c508b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/periodic/DailyRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class DailyRecord {
return;
}

const resourceURL = `${origin}/o/r/${resource.name || resource.id}`;
const resourceURL = `${origin}/o/r/${resource.uid || resource.name || resource.id}`;
const { data } = await this.axios.get(resourceURL, {
responseType: 'arraybuffer',
});
Expand Down
1 change: 1 addition & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type ResourceType = {
name?: string;
externalLink?: string;
type?: string;
uid?: string;
id: string;
filename: string;
};
Expand Down

0 comments on commit 5c508b8

Please sign in to comment.