Skip to content

Commit

Permalink
show key
Browse files Browse the repository at this point in the history
  • Loading branch information
Spedoske committed Jul 22, 2022
1 parent ba012ce commit 243e604
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/composables/usePasswordle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default () => {
status.loading = true
status.error = "";
try {
const response = await fetchByPost("/create/");
const response = await fetchByPost("/create");
clearPreset();
setPreset({
id: response.data.id,
Expand Down Expand Up @@ -98,6 +98,9 @@ export default () => {
const response = await fetchByPost(`/guess/${$global.id}`, {
guess: status.surmise,
});
if (response.data.key !== null){
alert(response.data.key);
}
setPreset({
result: response.data,
steps: $global.steps + 1,
Expand Down

0 comments on commit 243e604

Please sign in to comment.