Skip to content

Commit

Permalink
feat: remove useless console log
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot committed Oct 2, 2023
1 parent 1de9fe1 commit 48b6633
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions packages/code-du-travail-frontend/pages/api/themes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
console.log("API Themes", req.method);
await runMiddleware(req, res);
console.log("API Themes 2 ", req.method);
const controller = new ThemesController(req, res);
if (req.method === "GET") {
console.log("API Themes 3 ", req.method);
controller.get();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9428,7 +9428,6 @@
"metaDescription": "Idcc 0843 : Boulangerie-pâtisserie (entreprises artisanales)",
"slug": "843-boulangerie-patisserie-entreprises-artisanales",
"source": "conventions_collectives",
"answers": [],
"text": "IDCC 843: Convention collective nationale de la boulangerie-pâtisserie du 19 mars 1976. Etendue par arrêté du 21 juin 1978 JONC 28 juillet 1978. Boulangerie-pâtisserie (entreprises artisanales)",
"contributions": true,
"title_vector": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ describe("Themes", () => {

it("should return a list for /themes", async () => {
const res = await request(server).get("/api/themes");
console.log(res.body);
expect(res.status).toBe(200);
expect(res.body).toMatchSnapshot();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const populateAgreements = async (

if (idccList.length > 0) {
const body = getAgreements(idccList);
console.log("Popuplate agreements", elasticDocumentsIndex);
const response = await elasticsearchClient.search<SearchAgreementsResponse>(
{ body, index: elasticDocumentsIndex }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ export class ThemesController {
}

public async get() {
console.log("API Themes 11 ");
try {
console.log("API Themes 12");
const response = await getAllThemes();
this.res.status(200).json(response);
} catch (error) {
console.error("API Themes ERROR", error);
if (error instanceof NotFoundError) {
this.res.status(404).json({ message: error.message });
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getAllThemesQuery, getThemeBySlugQuery } from "./queries";

export const getAllThemes = async () => {
const body = getAllThemesQuery();
console.log("Get all themes from ", elasticDocumentsIndex);
const response = await elasticsearchClient.search({
body,
index: elasticDocumentsIndex,
Expand Down

0 comments on commit 48b6633

Please sign in to comment.