Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
GH-501 fixing a crazy weird case when refreshing tokens and before ho…
Browse files Browse the repository at this point in the history
…oks are not triggered
  • Loading branch information
Ferit Topcu committed Apr 2, 2019
1 parent 942516f commit 84d77d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
"build-client": "webpack --config webpack.client.js",
"build-server": "webpack --config webpack.server.js",
"clean": "rm -rf dist",
"debug-all": "run-p client 'build-server -- -dw' debug-server",
"all": "run-p client 'build-server -- -dw' server",
"client": "webpack-dev-server -d -w --history-api-fallback --inline --no-info --config webpack.client.js --content-base dist/client",
"server": "nodemon dist/server/server.min.js --watch dist/server",
"debug-server": "node --inspect-brk dist/server/server.min.js",
"start": "node dist/server/server.min.js",
"scm": "scm-source > scm-source.json"
},
Expand Down
3 changes: 2 additions & 1 deletion server/handler/CheckHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export class CheckHandler {
where: {
repositoryId: repoId
},
returning: true
returning: true,
individualHooks: true
});
} catch(e) {
throw new CheckHandlerError(REFRESH_TOKEN_ERROR, {repository: repoId})
Expand Down
2 changes: 1 addition & 1 deletion server/model/Check.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default db.define('check', {
},
hooks: {
beforeUpdate: encryptTokenHook,
beforeCreate: encryptTokenHook
beforeCreate: encryptTokenHook,
}
})

Expand Down

0 comments on commit 84d77d0

Please sign in to comment.