initial version of endpoint
This commit is contained in:
@@ -10,6 +10,19 @@ import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
const createIncident = `-- name: CreateIncident :one
|
||||
INSERT INTO incidents (external_id)
|
||||
VALUES (?)
|
||||
RETURNING id
|
||||
`
|
||||
|
||||
func (q *Queries) CreateIncident(ctx context.Context, externalID string) (int64, error) {
|
||||
row := q.db.QueryRowContext(ctx, createIncident, externalID)
|
||||
var id int64
|
||||
err := row.Scan(&id)
|
||||
return id, err
|
||||
}
|
||||
|
||||
const createIncoming = `-- name: CreateIncoming :one
|
||||
INSERT INTO "Incoming" (
|
||||
"incident_number", "description", "short_description", "urgency", "impact", "state", "external_id", "work_notes", "assignment_group", "assigned_to", "category", "subcategory", "created_at"
|
||||
|
Reference in New Issue
Block a user