This commit is contained in:
parent
b40e693748
commit
6871b1f8c6
5 changed files with 134 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ type SpaceRepository interface {
|
|||
GetMembers(spaceID string) ([]*model.SpaceMemberWithProfile, error)
|
||||
UpdateName(spaceID, name string) error
|
||||
UpdateTimezone(spaceID, timezone string) error
|
||||
Delete(spaceID string) error
|
||||
}
|
||||
|
||||
type spaceRepository struct {
|
||||
|
|
@ -135,3 +136,9 @@ func (r *spaceRepository) UpdateTimezone(spaceID, timezone string) error {
|
|||
_, err := r.db.Exec(query, timezone, time.Now(), spaceID)
|
||||
return err
|
||||
}
|
||||
|
||||
func (r *spaceRepository) Delete(spaceID string) error {
|
||||
query := `DELETE FROM spaces WHERE id = $1;`
|
||||
_, err := r.db.Exec(query, spaceID)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue