Skip to content

Commit

Permalink
Fix eqeqeq issues (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuck-dbos authored Jan 19, 2024
1 parent 94d1621 commit 3d92f12
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bank/bank-backend/src/workflows/txnhistory.workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class BankTransactionHistory {
"dbos-workflowuuid": workflowUUID,
},
});
if (remoteRes.status != 200) {
if (remoteRes.status !== 200) {
commCtxt.logger.error("Remote transfer failed, returned with status: " + remoteRes.statusText);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion e-commerce/shop-backend/src/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class Shop {
ctxt.logger.error(`Recovering order #${orderID} failed: payment service unreachable`);
}

if (updatedSession.payment_status == 'paid') {
if (updatedSession.payment_status === 'paid') {
await ctxt.invoke(Shop).fulfillOrder(orderID);
await ctxt.invoke(Shop).clearCart(username);
} else {
Expand Down
2 changes: 1 addition & 1 deletion yky-social/src/YKYOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static async findUser(ctx: ORMTC, curUid:string, uname:string, getProfile:boolea
const rGraph = await sgRep.findOneBy({
src_id: otherUser.id, tgt_id: curUid
});
if (rGraph && rGraph.link_type == GraphType.BLOCK) {
if (rGraph && rGraph.link_type === GraphType.BLOCK) {
return [undefined, undefined, undefined, undefined];
}

Expand Down
6 changes: 3 additions & 3 deletions yky-social/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function getS3(ctx: DBOSContext) {

// eslint-disable-next-line @typescript-eslint/require-await
async function authMiddleware (ctx: MiddlewareContext) {
if (ctx.requiredRole.length == 0) {
if (ctx.requiredRole.length === 0) {
return;
}

Expand Down Expand Up @@ -204,7 +204,7 @@ export class YKY
@PostApi("/follow")
static async doFollow(ctx: TransactionContext<EntityManager>, followUid: string) {
const curStatus = await Operations.getGraphStatus(ctx, ctx.authenticatedUser, followUid);
await Operations.setGraphStatus(ctx, ctx.authenticatedUser, followUid, curStatus == GraphType.FRIEND ? GraphType.FOLLOW_FRIEND : GraphType.FOLLOW);
await Operations.setGraphStatus(ctx, ctx.authenticatedUser, followUid, curStatus === GraphType.FRIEND ? GraphType.FOLLOW_FRIEND : GraphType.FOLLOW);
// TODO: That UID wasn't validated - maybe the DB should validate it

return {message: "Followed."};
Expand Down Expand Up @@ -273,7 +273,7 @@ export class YKY
if (!stat) {
errorWithStatus("Upload not in progress", 400);
}
if (stat!.authenticatedUser != ctx.authenticatedUser) {
if (stat!.authenticatedUser !== ctx.authenticatedUser) {
errorWithStatus("Unable to access workflow", 403);
}
// Should we look at status? What happens if this is a resubmit?
Expand Down

0 comments on commit 3d92f12

Please sign in to comment.