Skip to content

Commit 741b6b6

Browse files
author
James Fuqian
committed
fix func names with camelCase.
1 parent acd159f commit 741b6b6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

server/src/utils/bb2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import FormData from 'form-data';
33
import db from './db';
44
import config from '../configs/config';
55
import { generateCodeChallenge, generateRandomState } from './generatePKCE';
6-
import { post, post_w_config } from './request'
6+
import { post, postWithConfig } from './request'
77
import AuthorizationToken from '@entities/AuthorizationToken';
88

99
export function generateAuthorizeUrl(): string {
@@ -55,7 +55,7 @@ export async function refreshAccessToken(refreshToken: string) {
5555

5656
const BB2_ACCESS_TOKEN_URL = envConfig.bb2BaseUrl + '/' + db.settings.version + '/o/token/';
5757

58-
const tokenResponse = await post_w_config({
58+
const tokenResponse = await postWithConfig({
5959
method: 'post',
6060
url: BB2_ACCESS_TOKEN_URL,
6161
auth: {

server/src/utils/request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export async function post(endpoint_url: string, data: FormData, headers: any) {
1010
headers: headers}, true);
1111
}
1212

13-
export async function post_w_config(config: any) {
13+
export async function postWithConfig(config: any) {
1414
return await request(config, false);
1515
}
1616

@@ -39,7 +39,7 @@ export async function request(config: any, retryFlag: boolean) {
3939
// check for retryable (e.g. 500 & fhir) errors and do retrying...
4040
if (retryFlag && isRetryable(error)) {
4141
logger.info("Request failed and is retryable, entering retry process...")
42-
var retryResp = await do_retry(config)
42+
var retryResp = await doRetry(config)
4343
if (retryResp) {
4444
resp = retryResp;
4545
}
@@ -69,7 +69,7 @@ function isRetryable(error: any) {
6969

7070
// for demo: retry init-interval = 5 sec, max attempt 3, with retry interval = init-interval * (2 ** n)
7171
// where n retry attempted
72-
async function do_retry(config: any) {
72+
async function doRetry(config: any) {
7373
const interval = 5
7474
const max_attempts = 3
7575
var resp = null

0 commit comments

Comments
 (0)