Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
iamigo committed Aug 7, 2017
1 parent ca123a2 commit 8d7817e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/v1/controllers/ssoconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ module.exports = {
* @param {Function} next - The next middleware function in the stack
*/
deleteSSOConfig(req, res, next) {
const resultObj = { reqStartTime: new Date() };
authUtils.isAdmin(req)
.then((ok) => {
if (ok) {
const resultObj = { reqStartTime: new Date() };
helper.model.findOne()
.then((o) => {
if (o) {
Expand Down Expand Up @@ -148,10 +148,10 @@ module.exports = {
* @param {Function} next - The next middleware function in the stack
*/
patchSSOConfig(req, res, next) {
const resultObj = { reqStartTime: new Date() };
authUtils.isAdmin(req)
.then((ok) => {
if (ok) {
const resultObj = { reqStartTime: new Date() };
helper.model.findOne()
.then((o) => {
if (o) {
Expand Down Expand Up @@ -198,10 +198,10 @@ module.exports = {
* @param {Function} next - The next middleware function in the stack
*/
postSSOConfig(req, res, next) {
const resultObj = { reqStartTime: new Date() };
authUtils.isAdmin(req)
.then((ok) => {
if (ok) {
const resultObj = { reqStartTime: new Date() };
const toPost = req.swagger.params.queryBody.value;
const assocToCreate = u.includeAssocToCreate(toPost, helper);
helper.model.create(toPost, assocToCreate)
Expand Down Expand Up @@ -232,10 +232,10 @@ module.exports = {
* @param {Function} next - The next middleware function in the stack
*/
putSSOConfig(req, res, next) {
const resultObj = { reqStartTime: new Date() };
authUtils.isAdmin(req)
.then((ok) => {
if (ok) {
const resultObj = { reqStartTime: new Date() };
const toPut = req.swagger.params.queryBody.value;
const puttableFields =
req.swagger.params.queryBody.schema.schema.properties;
Expand Down

0 comments on commit 8d7817e

Please sign in to comment.