fix(support): add missing status bind parameter in admin create case
- Fix INSERT statement to use , , instead of hardcoded 'new' with placeholders
- Add .bind("new") for status parameter
This commit is contained in:
parent
ebc0a29437
commit
52ed6d7975
1 changed files with 7 additions and 6 deletions
|
|
@ -583,17 +583,18 @@ async fn admin_create_case(
|
|||
INSERT INTO support_tickets
|
||||
(subject, description, category, priority, status,
|
||||
requester_name, requester_email)
|
||||
VALUES ($1, $2, $3, $4, 'new', $5, $6)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
RETURNING id, subject, description, category, priority, status,
|
||||
requester_name, requester_email, assigned_to, created_at, updated_at
|
||||
"#,
|
||||
)
|
||||
.bind(&body.title)
|
||||
.bind(&body.description)
|
||||
.bind(&category)
|
||||
.bind(&priority)
|
||||
.bind(&body.requester_name)
|
||||
.bind(&body.requester_email)
|
||||
.bind(&body.description)
|
||||
.bind(&category)
|
||||
.bind(&priority)
|
||||
.bind("new")
|
||||
.bind(&body.requester_name)
|
||||
.bind(&body.requester_email)
|
||||
.fetch_one(&state.pool)
|
||||
.await;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue