We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 879d153 commit 7e8064cCopy full SHA for 7e8064c
src/hooks/submissions.ts
@@ -107,16 +107,15 @@ export function useLastSubmissionForUser(
107
`last-submission-${benchmarkId}-${language}`,
108
async () => {
109
if (benchmarkId && language) {
110
- const { data } = await axios.put(
111
- `${process.env.REACT_APP_API_ENDPOINT}/submissions`,
112
- {
113
- benchmarkId,
114
- language,
115
- },
+ const { data } = await axios.get(
+ `${process.env.REACT_APP_API_ENDPOINT}/benchmarks/${benchmarkId}/submissions/last`,
116
{
117
headers: {
118
Authorization: `Bearer ${token}`,
119
},
+ params: {
+ language,
+ },
120
121
);
122
return data;
0 commit comments