Skip to content

Commit

Permalink
Resolve linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sammrai committed Dec 3, 2023
1 parent fb04da4 commit 884387a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/actions/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export abstract class ApiResponseHandler {
decorator: (cheerio: CheerioAPI) => T
): Promise<T> {
const response = await this.axiosInstance.get(url);
console.log("get", url, response.status);
console.log("get", url, response.status);
// console.log("Response Headers: ", response.headers);
const $ = cheerio.load(response.data);
return decorator($);
Expand Down
10 changes: 6 additions & 4 deletions src/actions/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class Asset extends ApiResponseHandler {
case "sub_account_id_hash":
break;
case "id":
detail.assetId += `@${value}`
detail.assetId += `@${value}`;
break;
case "temp_asset_subclass_id":
break;
Expand Down Expand Up @@ -218,10 +218,12 @@ export class Asset extends ApiResponseHandler {
"user_asset_det[asset_subclass_id]": assetSubclassId,
"user_asset_det[name]": assetName,
"user_asset_det[value]": assetValue,
"user_asset_det[entried_price]": assetEntryValue !== undefined ? assetEntryValue : "",
"user_asset_det[entried_at]": assetEntryAt ? this.formatDate(assetEntryAt) : "",
"user_asset_det[entried_price]":
assetEntryValue !== undefined ? assetEntryValue : "",
"user_asset_det[entried_at]": assetEntryAt
? this.formatDate(assetEntryAt)
: "",
};
return this.post("/bs/portfolio/edit", postData);
}

}
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ async function main() {
app.get(
"/accounts/:accountString/assets",
async (req: Request, res: Response) => {
try{
try {
const { accountString } = req.params;
const portfolios: AssetModel[] = await assetController.getAssets(
accountString
);
);
res.status(200).json(portfolios);
}catch (error) {
} catch (error) {
res.status(500).send();
}
}
Expand Down

0 comments on commit 884387a

Please sign in to comment.