Fixed commit date issue on JSON upload
This commit is contained in:
@@ -74,6 +74,10 @@
|
||||
const jsonContent = JSON.stringify(data, null, 2);
|
||||
const base64Content = btoa(unescape(encodeURIComponent(jsonContent)));
|
||||
|
||||
// Get current timestamp for commit
|
||||
const now = new Date();
|
||||
const commitDate = now.toISOString();
|
||||
|
||||
// Upload to Gitea
|
||||
const response = await fetch(
|
||||
`${GITEA_API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/contents/${filepath}`,
|
||||
@@ -89,6 +93,10 @@
|
||||
content: base64Content,
|
||||
message: commitMessage,
|
||||
branch: 'main',
|
||||
dates: {
|
||||
author: commitDate,
|
||||
committer: commitDate,
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user