Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong redirection after deleting a torrent #118

Closed
josecelano opened this issue Jun 23, 2023 · 1 comment · Fixed by #121
Closed

Wrong redirection after deleting a torrent #118

josecelano opened this issue Jun 23, 2023 · 1 comment · Fixed by #121

Comments

@josecelano
Copy link
Member

josecelano commented Jun 23, 2023

When you delete a torrent, the application redirects to the deleted torrent details page.

By the way, the API endpoint is returning a 400 error instead of a 404:

http://localhost:3000/v1/torrent/443C7602B4FDE83D1154D6D9DA48808418B181B6

{
  "error": "Torrent not found."
}

We have to change it on the backend.

@josecelano
Copy link
Member Author

I think the problem could be that we are emitting the updated event after deleting the torrent in this function:

function deleteTorrent () {
  rest.value.torrent.deleteTorrent(props.torrent.info_hash)
    .then(() => {
      emit("updated");
    });
}

We should emit a deleted event and redirect to the torrent list page.

@josecelano josecelano added the bug label Jun 23, 2023
@josecelano josecelano linked a pull request Jun 26, 2023 that will close this issue
josecelano added a commit that referenced this issue Jun 26, 2023
3d5f39a fix: [#118] redirect to the torrent list after deleting a torrent (Jose Celano)

Pull request description:

  Redirect to the torrent list after deleting a torrent.

Top commit has no ACKs.

Tree-SHA512: 98a4af585beb5679cda7ef5c7bf2ce4335ad40e6a72457aa418bfc7801b9e16b993fc69e9085a66d84d94ce75d5f352a5c446aac3b0355f097f48da944fba3b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant