Rename "create" function to "add" in "scores" modules

main
sudoer777 2021-11-20 22:01:55 -07:00
parent c046eeb6ac
commit 4eadf64fac
4 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;`;

View File

@ -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;

View File

@ -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;