diff --git a/database/scores/teams.js b/database/scores/teams.js index 53450fd..3e09496 100644 --- a/database/scores/teams.js +++ b/database/scores/teams.js @@ -27,4 +27,12 @@ async function rename(id, name) { WHERE team_id = $1;`; await database.executeQuery(query, [id, name]); return new Team(id, name); +} + +async function remove(id) { + query = `DELETE FROM scores.teams + WHERE team_id = $1 + RETURNING team_name;`; + name = (await database.executeQuery(query, [id]))[0][0]; + return new Team(id, name); } \ No newline at end of file