Skip to content

Commit

Permalink
fix: fixing eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
macmiller87 committed Aug 27, 2024
1 parent 5d222be commit 9ed0cd5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ app.use("/api-doc", swaggerUi.serve, swaggerUi.setup(swaggerFile));
app.use((error, request, response, next) => {

if(error instanceof AppError) {
next;
return response.status(error.statusCode).json({ message: error.message });
}

Expand Down
2 changes: 1 addition & 1 deletion src/auth/EnsureBossAuthenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { authConfig } from "./authConfig.js";
import { AppError } from "../error/appError.js";
import crypto from 'node:crypto';

export async function EnsureUserAuthenticate(request, response) {
export async function EnsureUserAuthenticate(request) {

const authToken = request.headers.authorization.replace(/bearer\s/ig, '');

Expand Down
4 changes: 2 additions & 2 deletions src/error/appError.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export class AppError {
}

set message(message) {
return this._message = message;
this._message = message;
}

get statusCode() {
return this._statusCode;
}

set statusCode(statusCode) {
return this._statusCode = statusCode;
this._statusCode = statusCode;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe("Calculate Vacation Controller", () => {
authorization: `Bearer ${token}`
});

const firstCallTocalcVacation = await request(app).post("/calculateVacation").query({
await request(app).post("/calculateVacation").query({
employee_id: employee.body.employee.employee_id

}).set({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe("Calculate Vacation (Unit Test)", () => {
token: token
});

const firstCallTocalcVacation = await inMemoryVacationRepository.calculateVacation({
await inMemoryVacationRepository.calculateVacation({
employee_id: employee.employee_id,
token: token
});
Expand Down

0 comments on commit 9ed0cd5

Please sign in to comment.