Skip to content

Commit 74a82d9

Browse files
committed
doc fixes and clarifications
1 parent c619dbe commit 74a82d9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/lib/team.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ async function listModeratedBy (osmId) {
136136
* @param {string} data.name - name of the team
137137
* @param {geojson} data.location - lat/lon of team
138138
* @param {int} osmId - id of first moderator
139-
* @param {object} conn - optional parameter for database connection to re-use connection in case of nested
139+
* @param {object=} trx - optional parameter for database connection to re-use connection in case of nested
140140
* transactions. This is used when a team is created as part of an organization
141141
* @return {promise}
142142
**/
143-
async function create (data, osmId, conn) {
143+
async function create (data, osmId, trx) {
144144
if (!osmId) throw new Error('moderator osm id is required as second argument')
145145
if (!data.name) throw new Error('data.name property is required')
146-
conn = conn || await db()
146+
const conn = trx || await db()
147147
const st = knexPostgis(conn)
148148

149149
// convert location to postgis geom

app/tests/api/organization-model.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ test('create an organization', async (t) => {
3737

3838
// tests
3939
t.is(data.name, name)
40-
t.truthy(data.name, name)
4140
t.true(await organization.isOwner(data.id, user))
4241
t.true(await organization.isManager(data.id, user))
4342
})
@@ -180,7 +179,7 @@ test('add managers', async t => {
180179

181180
/**
182181
* Test removing managers
183-
* - After adding and removing a manager the number of owners should remain the same
182+
* - After adding and removing a manager the number of managers should remain the same
184183
* - Removing a user that is not a manager throws an error
185184
*/
186185
test('remove managers', async t => {

0 commit comments

Comments
 (0)