Skip to content

Commit

Permalink
Merge pull request #314 from dhis2/fix/add-user-to-org-uploading
Browse files Browse the repository at this point in the history
fix(createapp): add user to organisation if org does note xist
  • Loading branch information
Birkbjo authored Apr 22, 2020
2 parents 5be3181 + ffb0733 commit 6a53a63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/src/routes/v1/apps/handlers/createApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ module.exports = {
knex,
trx
)
await addUserToOrganisation(
{
userId: currentUserId,
organisationId: organisation.id,
},
knex,
trx
)
} else {
organisation = organisations[0]
if (currentUserId !== organisation.created_by_user_id) {
Expand Down

0 comments on commit 6a53a63

Please sign in to comment.