mirror of
https://github.com/nicksherron/bashhub-server.git
synced 2025-01-04 06:13:06 +08:00
command insert all command fields
This commit is contained in:
parent
875f714d90
commit
fce98a912a
1 changed files with 3 additions and 3 deletions
|
@ -122,9 +122,9 @@ func (user User) tokenExists() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cmd Command) commandInsert() int64 {
|
func (cmd Command) commandInsert() int64 {
|
||||||
res, err := DB.Exec(`INSERT INTO commands("uuid", "command", "created", "path", "user_id")
|
res, err := DB.Exec(`INSERT INTO commands("process_id","process_start_time","exit_status","uuid", "command", "created", "path", "user_id")
|
||||||
VALUES ($1,$2,$3,$4,(select "id" FROM users WHERE "token" = $5))`,
|
VALUES ($1,$2,$3,$4,$5,$6,$7,(select "id" FROM users WHERE "token" = $8))`,
|
||||||
cmd.Uuid, cmd.Command, cmd.Created, cmd.Path, cmd.Token)
|
cmd.ProcessId, cmd.ProcessStartTime, cmd.ExitStatus, cmd.Uuid, cmd.Command, cmd.Created, cmd.Path, cmd.Token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue