Skip to content

Commit

Permalink
fix(): #61 additional (#75)
Browse files Browse the repository at this point in the history
* fix(): small fixes, removing unnecessary comments etc.
  • Loading branch information
mkucharz authored Jan 16, 2018
1 parent 8f8b83d commit 9276fe1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ With `channel` method you're able to:
# Import

```js
const {channel} = Server(ctx)
const {channel} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ With `data` method you're able to:
# Import

```js
const {data} = Server(ctx)
const {data} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ With `socket` method you're able to:
# Import

```js
const {socket} = Server(ctx)
const {socket} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ With `event` method you're able to:
# Import

```js
const {event} = Server(ctx)
const {event} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ With `logger` method you're able to:
# Import

```js
const {logger} = Server(ctx)
const {logger} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ With `response` method you're able to:
# Import

```js
const {response} = Server(ctx)
const {response} = new Server(ctx)
```

# Methods
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-js-core/docs/basics/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ With `users` you're able to:
# Import

```js
const {users} = Server(ctx)
const {users} = new Server(ctx)
```

# Methods
Expand Down
8 changes: 0 additions & 8 deletions packages/lib-js-core/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ class Data extends QueryBuilder {
return processedResult
}

// saveToResult (response) {
// // return = this.result.concat(response.objects)
// return = response.objects)
// }

resolveIfFinished (result) {
if (this.query.page_size !== 0) {
return result.slice(0, this.query.page_size)
Expand Down Expand Up @@ -217,9 +212,6 @@ class Data extends QueryBuilder {

const fetches = urls.map(async url => self.request(url))

// results = await self._replaceCustomTypesWithValue(results)
// results = await self._mapFields(results)

let results = await Promise.all(fetches)
results = [].concat.apply([], results)
results = await self.resolveRelatedModels(results)
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-js-core/test/e2e/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ describe('Data', function () {
.take(3)
.pluck('field_string')
.should.become(['example-string1', 'example-string2', 'example-string3'])
}) // eslint-disable-line camelcase
})
})

describe('#value()', () => {
Expand Down Expand Up @@ -339,7 +339,7 @@ describe('Data', function () {

run()
.where([
['field_string', '=', 'example-string'], // eslint-disable-line camelcase
['field_string', '=', 'example-string'],
['field_integer', '>=', 100]
])
.list()
Expand Down

0 comments on commit 9276fe1

Please sign in to comment.