Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin should be able to upgrade user level #35

Conversation

benfluleck
Copy link
Owner

PR implements the logic for the Administrator upgrading the user levels

Description

  • Implementation of route for admin notifications
  • Implementation of route to change password
  • Implementation of route to change user level
  • Implemention of route to change user categories
  • Default images are loaded from server side
  • New models for user level, notifications, category
  • admin logic created for admin routes , decoding the token for admin details.
  • seed files for categories and levels implemented

Description of Task to be completed?

Implemented admin functionality for the server side to manage the clients

Screenshots (if appropriate):

Any background context you want to provide?

Coverage on coveralls is at 93%

What are the relevant pivotal tracker stories?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Benny Ogidan added 6 commits November 25, 2017 22:45
- Models of tables re-constructed to take into account newly constructed tables
- Models of User level , Notifications, Categories implemented
- Implemented route for admin notifications
- Implemented route to change password
- Implemented route to change user level
- Implement route to change user categories
- Default images are loaded from server side
- New models for userlevel, notifications, category
- admin logic created for admin routes
- seed files for categories and levels implemented
- Implement suffiecient tests to give above average coverage of code.

- Admin middleware for Admin routes

- Seed logic creatred for app to ensure easier usability.
}
});
},
down: function(queryInterface, Sequelize) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected method shorthand object-shorthand
Unexpected unnamed method 'down' func-names
Missing space before function parentheses space-before-function-paren
'Sequelize' is defined but never used no-unused-vars

@@ -0,0 +1,36 @@
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected method shorthand object-shorthand
Unexpected unnamed method 'up' func-names
Missing space before function parentheses space-before-function-paren

@@ -0,0 +1,36 @@
'use strict';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected newline after "use strict" directive lines-around-directive
'use strict' is unnecessary inside of modules strict

}
});
}).on('error', (err) => {
console.log(`Error: ${err.message}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected console statement no-console

// optional logging... disable after it's working
console.log(`======WAKUP DYNO: HEROKU RESPONSE: ${chunk}`);
} catch (err) {
console.log(err.message);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected console statement no-console

@@ -2,4 +2,6 @@ require('./user.spec');
require('./books.spec');
require('./userbooks.spec');
require('./model.spec');

require('./categories.spec');
require('./authenticate.spec');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module './authenticate.spec' import/no-unresolved

@@ -2,4 +2,6 @@ require('./user.spec');
require('./books.spec');
require('./userbooks.spec');
require('./model.spec');

require('./categories.spec');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module './categories.spec' import/no-unresolved

import chai from 'chai';
import chaiHttp from 'chai-http';

import app from '../app';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module '../app' import/no-unresolved
Missing file extension for "../app" import/extensions

@@ -0,0 +1,226 @@
import chai from 'chai';
import chaiHttp from 'chai-http';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai-http' import/no-unresolved
Missing file extension for "chai-http" import/extensions

@@ -0,0 +1,226 @@
import chai from 'chai';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved
Missing file extension for "chai" import/extensions

@benfluleck benfluleck closed this Nov 28, 2017
@benfluleck benfluleck reopened this Nov 28, 2017
@benfluleck benfluleck merged commit 3b5ceec into development Nov 28, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+4.4%) to 93.251% when pulling 2ff68e4 on feature/153149477admin-should-be-able-to-upgrade-user-level into 9290978 on development.

@benfluleck benfluleck deleted the feature/153149477admin-should-be-able-to-upgrade-user-level branch December 13, 2017 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants