Skip to content

Commit

Permalink
feat(general): new core refactor (#59)
Browse files Browse the repository at this point in the history
New core refactor

BREAKING CHANGE: new core refactor
  • Loading branch information
serge1peshcoff authored Jun 12, 2020
1 parent 6585b3b commit 60e5658
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const config = {
database: process.env.DB_DATABASE || 'discounts'
},
core: {
url: 'http://oms-core-elixir',
port: 4000
url: 'http://oms-core-js',
port: 8084
},
mailer: {
url: 'http://oms-mailer',
Expand Down
3 changes: 1 addition & 2 deletions lib/integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ exports.claimCode = async (req, res) => {
await codeToClaim.update({ claimed_by: req.user.id });

await mailer.sendMail({
from: 'oms-mailer@aegee.org',
to: req.user.user.email,
to: req.user.email,
subject: `Your ${req.integration.name} discount code`,
template: 'custom.html',
parameters: {
Expand Down
1 change: 0 additions & 1 deletion test/assets/oms-core-permissions-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"description": "Manage discounts",
"combined": "global:manage:discounts",
"circles": null,
"always_assigned": false,
"action": "manage"
}]
}
19 changes: 7 additions & 12 deletions test/assets/oms-core-valid.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"success": true,
"data": {
"user_id": 1,
"user": {
"superadmin": true,
"name": "admin",
"member_id": null,
"inserted_at": "2018-05-03T23:12:01.111566",
"id": 1,
"email": "admin@aegee.org",
"active": true
},
"seo_url": "microservice",
"superadmin": true,
"username": "admin",
"member_id": null,
"inserted_at": "2018-05-03T23:12:01.111566",
"id": 1,
"email": "admin@aegee.org",
"active": true,
"primary_body_id": null,
"primary_body": null,
"phone": "+123456789",
Expand Down Expand Up @@ -62,7 +58,6 @@
"approved": true
}
],
"id": 1,
"gender": "machine",
"first_name": "Microservice",
"date_of_birth": "2010-04-17",
Expand Down

0 comments on commit 60e5658

Please sign in to comment.