Skip to content

Commit

Permalink
Merge branch 'fix/linterWarnings' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Schmitt committed Mar 26, 2020
2 parents 6f93055 + faf0d8e commit 47d5425
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Build and Release

on:
push:
tags: v*
tags:
- v*

jobs:
build:
Expand All @@ -13,7 +14,7 @@ jobs:
- name: Install Node-Version 12
uses: actions/setup-node@v1
with:
node-version: "12"
node-version: '12'
- name: Run npm install, bundle and test
run: |
npm install
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"trailingComma": "es5",
"singleQuote": true,
"useTabs": true,
"printWidth": 80
}
1 change: 1 addition & 0 deletions bundle/sipgate-io.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require('fs');

describe('sipgate-io module', () => {
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
preset: 'ts-jest',
roots: ["./"]
preset: 'ts-jest',
roots: ['./'],
};
7 changes: 3 additions & 4 deletions lib/core/helpers/authorizationInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ export interface AuthInfo {
sub: string;
}

export const getAuthenticatedWebuser = (
export const getAuthenticatedWebuser = async (
httpClient: HttpClientModule
): Promise<string> => {
return httpClient
.get<AuthInfo>('authorization/userinfo')
.then(requestData => requestData.data.sub);
const requestData = await httpClient.get<AuthInfo>('authorization/userinfo');
return requestData.data.sub;
};
1 change: 0 additions & 1 deletion lib/fax/fax.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint @typescript-eslint/ban-ts-ignore: 0 */
import { ErrorMessage } from './errors/ErrorMessage';
import { FaxDTO } from './models/fax.model';
import { HttpClientModule } from '../core/httpClient';
Expand Down
5 changes: 1 addition & 4 deletions lib/webhook-settings/webhookSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ describe('setIncomingUrl', () => {

await settingsModule.setIncomingUrl(TEST_INCOMING_URL);

await expect(mockClient.put).toBeCalledWith(
expect.anything(),
expectedSettings
);
expect(mockClient.put).toBeCalledWith(expect.anything(), expectedSettings);
});

it('should throw an error when supplied with an invalid url', async () => {
Expand Down

0 comments on commit 47d5425

Please sign in to comment.