Skip to content

Commit

Permalink
fix: server/api/github/commit/index.post.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohaodu committed Dec 26, 2023
1 parent 8bc5fce commit 920b45f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions components/BlogShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ const blogDirPathExtend = computed(() => {
return temp?.join('/') || '';
});
const blogName = computed(() => {
const temp = props.blogPath?.split('/');
return temp?.pop() || '';
});
const blogName = ref(
(() => {
const temp = props.blogPath?.split('/');
return temp?.pop() || '';
})(),
);
const commitConfig = ref<CommitConfig>({
message: '',
mode: '100644',
Expand Down
3 changes: 0 additions & 3 deletions server/api/github/commit/index.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default defineEventHandler((event) => {
createBlobsConfig: createBlobsConfig,
},
})) as RepoCreateBlobs['response']['data'];
console.log(createBlobs);

// 4. 生成 tree
const createTreeConfig = {
Expand Down Expand Up @@ -114,8 +113,6 @@ export default defineEventHandler((event) => {
})) as RepoUpdateRef['response']['data'];
resolve(updateRef);
} catch (error) {
console.log(error);

resolve(error);
}
});
Expand Down

0 comments on commit 920b45f

Please sign in to comment.