mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
renaming
This commit is contained in:
@ -20,7 +20,7 @@ const knex = require('../utils/knex_config');
|
||||
* @param {*} organizationId
|
||||
* @returns true if administrator, false otherwise
|
||||
*/
|
||||
async function isPersonAdmin (personId, organizationId) {
|
||||
async function isPersonOrganizationAdministrator (personId, organizationId) {
|
||||
const isPersonAdmin = await knex('OrganizationAdministrator')
|
||||
.where('id_person', personId)
|
||||
.where('id_organization', organizationId)
|
||||
@ -84,7 +84,7 @@ async function removeOrganizationAdmin (personId, organizationId) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isPersonAdmin,
|
||||
isPersonOrganizationAdministrator,
|
||||
addOrganizationAdministrator,
|
||||
removeOrganizationAdmin
|
||||
};
|
||||
|
@ -21,12 +21,12 @@ const knex = require('../utils/knex_config');
|
||||
* @param {*} isHiring
|
||||
* @returns
|
||||
*/
|
||||
function organization (name, location, description, isHiring) {
|
||||
function createOrganization (name, location, description, isHiring) {
|
||||
const organization = {
|
||||
name,
|
||||
location,
|
||||
description,
|
||||
isHiring
|
||||
name: name,
|
||||
location: location,
|
||||
description: description,
|
||||
is_hiring: isHiring
|
||||
};
|
||||
return organization;
|
||||
}
|
||||
@ -139,7 +139,7 @@ async function deleteOrganization (organizationId, requester) {
|
||||
// module available for use in another module.
|
||||
module.exports = {
|
||||
getOrganizationById,
|
||||
organization,
|
||||
createOrganization,
|
||||
insertOrganization,
|
||||
updateOrganization,
|
||||
deleteOrganization
|
||||
|
@ -19,7 +19,7 @@ const knex = require('../utils/knex_config');
|
||||
* @param {*} content
|
||||
* @param {*} originalAuthor
|
||||
*/
|
||||
function organizationPost (organizationId, content, originalAuthor) {
|
||||
function createOrganizationPost (organizationId, content, originalAuthor) {
|
||||
const organizationPost = {
|
||||
organization_id: organizationId,
|
||||
content,
|
||||
@ -90,7 +90,7 @@ async function deleteOrganizationPost (postId, requester) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
organizationPost,
|
||||
createOrganizationPost,
|
||||
insertOrganizationPost,
|
||||
isPersonPostAdministrator,
|
||||
deleteOrganizationPost
|
||||
|
@ -25,7 +25,7 @@ const bcrypt = require('bcrypt');
|
||||
* @param {*} place_of_living
|
||||
* @returns
|
||||
*/
|
||||
function person (email, password, display_name, date_of_birth, available, enabled, place_of_living) {
|
||||
function createPerson (email, password, display_name, date_of_birth, available, enabled, place_of_living) {
|
||||
const person = {
|
||||
email: email.toLowerCase(),
|
||||
password,
|
||||
@ -138,7 +138,7 @@ async function deletePerson (person_id) {
|
||||
// means making a JavaScript function defined in one
|
||||
// module available for use in another module.
|
||||
module.exports = {
|
||||
person,
|
||||
createPerson,
|
||||
getPersonByEmail,
|
||||
getPersonById,
|
||||
getPersonByEmailAndPassword,
|
||||
|
Reference in New Issue
Block a user