Skip to content

Using the redirect component #194

Answered by lovasoa
lozdown asked this question in Q&A
Jan 19, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The way you are doing it now is, I think, simple and idiomatic. If you really want to merge this into a single file, you can add a URL parameter:

DELETE FROM "user" WHERE id=$user_id::int AND $confirmed IS NOT NULL
RETURNING 'redirect' AS component, 'index.sql' as link;

select 'alert' as component, 'Deleting id ' || $user_id as title;
select 'Continue' as title, '?confirmed&user_id=' || $user_id as link; 
select 'Cancel' as title, 'index.sql' as link;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lozdown
Comment options

Answer selected by lozdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants