Skip to content

Commit c7cf56b

Browse files
committed
2
1 parent 88c8a39 commit c7cf56b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ export class DatabaseConnection {
511511
} else {
512512
query = { _id: q.item._id };
513513
}
514+
var user: TokenUser = Crypt.verityToken(q.jwt);
514515
var exists = await this.query(query, { name: 1 }, 2, 0, null, q.collectionname, q.jwt);
515516
this._logger.debug("[" + user.username + "][" + q.collectionname + "] query gave " + arr.length + " results " + JSON.stringify(query));
516517
if (exists.length == 1) {
@@ -519,7 +520,6 @@ export class DatabaseConnection {
519520
else if (exists.length > 1) {
520521
throw JSON.stringify(query) + " is not uniqe, more than 1 item in collection matches this";
521522
}
522-
var user: TokenUser = Crypt.verityToken(q.jwt);
523523
if (!this.hasAuthorization(user, q.item, "update")) { throw new Error("Access denied"); }
524524
// if (q.item._id !== null && q.item._id !== undefined && q.item._id !== "") {
525525
if (exists.length == 1) {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.286
1+
0.0.287

0 commit comments

Comments
 (0)