Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
change restore api to post req
Browse files Browse the repository at this point in the history
  • Loading branch information
burnerlee committed Mar 29, 2024
1 parent 7a267b0 commit e5d9b82
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sources/src/s3-cache/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ export async function restoreCache(paths: string[], primaryKey: string, restoreK
for (const key of keys) {
try {
const cacheManagerUrl = state.getInput("cache-manager-endpoint")!;
const response = await fetch(`${cacheManagerUrl}/api/v1/cache/restore/${key}`);
const postData = {
"key": key,
}
const response = await fetch(`${cacheManagerUrl}/api/v1/cache/restore`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(postData),
});
const statusCode = response.status;
const data = await response.json();
switch (statusCode) {
Expand Down

0 comments on commit e5d9b82

Please sign in to comment.