Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eqeqeq issues #99

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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