From 4eadf64fac3692869bcf38fb6846e867c63683d9 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Sat, 20 Nov 2021 22:01:55 -0700 Subject: [PATCH] Rename "create" function to "add" in "scores" modules --- database/scores/divisions.js | 4 ++-- database/scores/seasons.js | 2 +- database/scores/sports.js | 4 ++-- database/scores/teams.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/database/scores/divisions.js b/database/scores/divisions.js index 6f0a443..b04d6a5 100644 --- a/database/scores/divisions.js +++ b/database/scores/divisions.js @@ -20,7 +20,7 @@ function getGenderID(gender) { -async function create(name, gender, sportID) { +async function add(name, gender, sportID) { const query = `INSERT INTO scores.divisions(division_name,gender,sport_id) VALUES($1,$2,$3) RETURNING division_id;`; @@ -64,7 +64,7 @@ async function retrieveBySportAndGender(sportID, gender) { -exports.create = create; +exports.add = add; exports.rename = rename; exports.remove = remove; exports.retrieveBySportAndGender = retrieveBySportAndGender; \ No newline at end of file diff --git a/database/scores/seasons.js b/database/scores/seasons.js index b8ff917..bd9704d 100644 --- a/database/scores/seasons.js +++ b/database/scores/seasons.js @@ -13,7 +13,7 @@ class Season { -async function create(year) { +async function add(year) { const query = `INSERT INTO scores.seasons(school_year) VALUES($1) RETURNING season_id;`; diff --git a/database/scores/sports.js b/database/scores/sports.js index c801612..14a6e45 100644 --- a/database/scores/sports.js +++ b/database/scores/sports.js @@ -11,7 +11,7 @@ class Sport { -async function create(name) { +async function add(name) { const query = `INSERT INTO scores.sports(sport_name) VALUES($1) RETURNING sport_id;`; @@ -52,7 +52,7 @@ async function retrieveAll() { -exports.create = create; +exports.add = add; exports.rename = rename; exports.remove = remove; exports.retrieveAll = retrieveAll; \ No newline at end of file diff --git a/database/scores/teams.js b/database/scores/teams.js index a6dac68..1bad3fa 100644 --- a/database/scores/teams.js +++ b/database/scores/teams.js @@ -13,7 +13,7 @@ class Team { -async function create(name, sportID) { +async function add(name, sportID) { const query = `INSERT INTO scores.teams(team_name, sport_id) VALUES($1, $2) RETURNING team_id;`; @@ -55,7 +55,7 @@ async function retrieveBySport(sportID) { -exports.create = create; +exports.add = add; exports.rename = rename; exports.remove = remove; exports.retrieveBySport = retrieveBySport; \ No newline at end of file