Skip to content

Commit

Permalink
refs
Browse files Browse the repository at this point in the history
  • Loading branch information
pantsel committed Sep 28, 2017
1 parent de19f58 commit 0425f9d
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ nbproject
!/logs/.gitkeep
/config/mssqlconfig.js
/www/
/kongadata/
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,7 @@ All notable changes to this project will be documented in this file.

## [0.8.6](https://github.com/pantsel/konga/releases/tag/v0.8.6) - 24-9-2017

* Fix broken dependencies.
## [0.8.7](https://github.com/pantsel/konga/releases/tag/v0.8.7) - 29-9-2017

* [FIX] Tests are working again.
* [FIX] <code>kongadata</code> dir is now created inside the project folder by default.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ RUN npm --unsafe-perm --verbose install --production

EXPOSE 1337

RUN chmod 777 ./start.sh

VOLUME /kongadata

RUN chmod 777 ./start.sh

ENTRYPOINT ["/bin/bash","./start.sh"]
4 changes: 2 additions & 2 deletions api/controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ module.exports = _.merge(_.cloneDeep(require('../base/Controller')), {
}


if(!passports) return res.json(updated)
if(!passports) return res.json(user)

sails.models.passport
.update({user:req.param('id')},{password:passports.password})
.exec(function(err,updatedPassport){
if(err) return res.negotiate(err);
return res.json(updated)
return res.json(user)
})


Expand Down
4 changes: 2 additions & 2 deletions assets/js/app/connections/connections-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
node : isActive(node) ? null : node
}).then(function onSuccess(res) {
var credentials = $localStorage.credentials
var user = res.data[0];
var user = res.data;
if(!user.node) {
delete credentials.user.node;
} else{
Expand Down Expand Up @@ -270,7 +270,7 @@
node : result.data
}).then(function onSuccess(res) {
var credentials = $localStorage.credentials
var user = res.data[0];
var user = res.data;
if(!user.node) {
delete credentials.user.node;
} else{
Expand Down
2 changes: 1 addition & 1 deletion assets/js/app/users/user-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
$scope.showForm = false;
MessageService.success('User "' + $scope.user.username + '" updated successfully');
initUserPassports()
UserService.updateUser(data.data[0],true)
UserService.updateUser(data.data,true)
deferred.resolve(true);
},function(err){
console.log("Err",err)
Expand Down
2 changes: 1 addition & 1 deletion config/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports.bootstrap = function bootstrap(next) {


// Create Konga data directories
var dirs = [( process.env.STORAGE_PATH || '/kongadata/' ), ( process.env.STORAGE_PATH || '/kongadata/' )+ 'uploads']
var dirs = [( process.env.STORAGE_PATH || './kongadata/' ), ( process.env.STORAGE_PATH || './kongadata/' )+ 'uploads']


dirs.forEach(function(dir){
Expand Down
2 changes: 1 addition & 1 deletion config/connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports.connections = {
*/
localDiskDb: {
adapter: 'sails-disk',
filePath: process.env.NODE_ENV == 'test' ? './.tmp/' : ( process.env.STORAGE_PATH || '/kongadata/' ),
filePath: process.env.NODE_ENV == 'test' ? './.tmp/' : ( process.env.STORAGE_PATH || './kongadata/' ),
fileName: process.env.NODE_ENV == 'test' ? 'localDiskDb.db' : 'konga.db'
},

Expand Down
2 changes: 1 addition & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/

module.exports.paths = {
"uploads" : ( process.env.STORAGE_PATH || '/kongadata/' )+ 'uploads/'
"uploads" : ( process.env.STORAGE_PATH || './kongadata/' )+ 'uploads/'
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kongadmin",
"version": "0.8.6",
"version": "0.8.7",
"description": "Kong admin GUI",
"keywords": [
"sails.js",
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/User.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"email": "[email protected]",
"firstName": "Arnold",
"lastName": "Administrator",
"active": true,
"admin": true
},
{
Expand All @@ -14,6 +15,7 @@
"firstName": "John",
"lastName": "Doe",
"admin": false,
"active": true,
"createdUser": 1,
"updatedUser": 1
}
Expand Down
7 changes: 5 additions & 2 deletions test/functional/common/controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Generic controller test', function controllerTest() {
[
{
controller: 'UserController',
url: '/user/',
url: '/api/user/',
identifier: 1,
count: 2,
data: {
Expand All @@ -19,28 +19,31 @@ describe('Generic controller test', function controllerTest() {
email: "[email protected]",
firstName: "Arnold",
lastName: "Administrator",
active: true,
admin: true
},
newRecord: {
username: "schwarzenegger",
email: "[email protected]",
firstName: "Arnold",
lastName: "Schwarzenegger",
active: true,
admin: false
},
updateRecord: {
username: "stallone",
email: "[email protected]",
firstName: "Sylvester",
lastName: "Stallone",
active: true,
admin: false
}

}
},
{
controller: 'KongNodeController',
url: '/kongnode/',
url: '/api/kongnode/',
identifier: 1,
count: 1,
data: {
Expand Down

0 comments on commit 0425f9d

Please sign in to comment.