update todo, delete uneccessary body http respons
This commit is contained in:
@@ -125,6 +125,15 @@ func DbSaveGroupWithoutClients(ctx context.Context, group *Group) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// DbDeleteGroup deletes given group by id
|
||||
// return: error if not successful
|
||||
func DbDeleteGroup(ctx context.Context, group *Group) error {
|
||||
_, err := dbConn.Exec(ctx, `
|
||||
DELETE FROM chat_groups WHERE id = $1
|
||||
`, group.Id)
|
||||
return err
|
||||
}
|
||||
|
||||
// DbSetGroupByIdWithoutClients sets all fields of given struct with database's data using id, populates Clients map with member ids but not their data
|
||||
// return: error if not successful
|
||||
func DbSetGroupByIdWithoutClients(ctx context.Context, group *Group) error {
|
||||
|
||||
Reference in New Issue
Block a user