diff --git a/database/scores/seasons.js b/database/scores/seasons.js index de32b2b..55e9941 100644 --- a/database/scores/seasons.js +++ b/database/scores/seasons.js @@ -19,4 +19,12 @@ async function create(year) { RETURNING season_id;`; const id = (await database.executeQuery(query, [year]))[0][0]; return new Season(id, year); +} + +async function remove(id) { + const query = `DELETE FROM scores.seasons + WHERE season_id = $1 + RETURNING school_year;`; + const year = (await database.executeQuery(query, [id]))[0][0]; + return new Season(id, year); } \ No newline at end of file