Skip to content

can't get redirect() working after a delete request #4775

Answered by mehdirayan
mehdirayan asked this question in Help
Discussion options

You must be logged in to vote

hi every body
this is working for me
public async destruct({ request, response }: HttpContext) {

const contact: Contact = request.all().contactData
const client: Client = request.all().clientData


await ContactsService.deleteContact(contact.id)


return response.redirect().withQs({ clientData: client}).toRoute('contacts.contacts.show')

}

The redirect alone doesn't send query parameters. i had to add withQs() function.
thanks for help!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mehdirayan
Comment options

@mehdirayan
Comment options

Answer selected by mehdirayan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants