mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix sql statements
This commit is contained in:
@@ -227,7 +227,17 @@ func (ds *sqlStore) RemoveApp(ctx context.Context, appName string) error {
|
|||||||
return models.ErrAppsNotFound
|
return models.ErrAppsNotFound
|
||||||
}
|
}
|
||||||
_, err = ds.db.ExecContext(ctx, ds.db.Rebind(
|
_, err = ds.db.ExecContext(ctx, ds.db.Rebind(
|
||||||
`DELETE FROM routes, calls, logs WHERE app_name=?`), appName)
|
`DELETE FROM logs WHERE app_name=?`), appName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = ds.db.ExecContext(ctx, ds.db.Rebind(
|
||||||
|
`DELETE FROM calls WHERE app_name=?`), appName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = ds.db.ExecContext(ctx, ds.db.Rebind(
|
||||||
|
`DELETE FROM routes WHERE app_name=?`), appName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user