Skip to content

Commit 711808c

Browse files
committed
Lint
1 parent 03cbea9 commit 711808c

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Additions
66

77
### Fixes
8+
- Lint
89

910
## [3.2.0] Aug-19-2019
1011

src/bodyguard/get-readable-fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function getReadableFields(
1919

2020
// Traverse members of payload, and append the member to
2121
// readable fields if the CanRead() key allows
22-
for (let member in payload) {
22+
for (const member in payload) {
2323
if (member && !(payload[member] instanceof Function)) {
2424
const canRead = getCanRead(payload, member);
2525

src/bodyguard/get-readable-relations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function getReadableRelations(
1919

2020
// Traverse members of payload, and append the member to
2121
// readable fields if the CanRead() key allows
22-
for (let member in payload) {
22+
for (const member in payload) {
2323
if (member && !(payload[member] instanceof Function)) {
2424
const canRead = getCanReadRelation(payload, member);
2525

src/database/base-db.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { ExampleUser } from '../models/example-user';
55
* Base Database class
66
*/
77
export class BaseDb {
8-
// Database logging function
9-
public logger: Function = (message, body?) => console.log(message, body);
10-
118
// Database entities
129
public entities: any[] = [ ExampleUser ];
1310

@@ -25,6 +22,9 @@ export class BaseDb {
2522
*/
2623
constructor() {}
2724

25+
// Database logging function
26+
public logger: Function = (message, body?) => console.log(message, body);
27+
2828
/**
2929
* Set ORM entities
3030
* @param entities Array of entities

src/pointy-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class PointyApi {
4343
public db: BaseDb;
4444
public http = new HttpClient();
4545
public userType: BaseUserInterface = ExampleUser;
46-
public testmode: boolean = false;
46+
public testmode = false;
4747

4848
// Middleware
4949

src/query-tools/get-query.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ export async function getQuery(
9797

9898
// Append to where clause
9999
// TODO: [Issue #146] The following code creates a bug, where if a user is authenticated
100-
// and not admin, they will be unable to view the resource, including AnyoneCanRead()
101-
// keys.
102-
// Although the initial purpose for the exact code is scarcely documented, it is believed
103-
// to be used to prevent the database from pulling enourmous payloads that will be filtered
104-
// extensively (to dramatically reduce runtime of the guards and filters).
100+
// and not admin, they will be unable to view the resource, including AnyoneCanRead()
101+
// keys.
102+
// Although the initial purpose for the exact code is scarcely documented, it is believed
103+
// to be used to prevent the database from pulling enourmous payloads that will be filtered
104+
// extensively (to dramatically reduce runtime of the guards and filters).
105105
/*
106106
if (
107107
bodyguardKeys &&

0 commit comments

Comments
 (0)