Skip to content

Commit

Permalink
clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
carolineBda committed Oct 6, 2023
1 parent c62cff4 commit 89f5271
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 425 deletions.
1 change: 0 additions & 1 deletion targets/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"memoizee": "^0.4.15",
"micromark": "^2.11.4",
"next": "13.2.4",
"next-remove-imports": "^1.0.11",
"next-urql": "^3.2.1",
"nodemailer": "^6.6.5",
"p-limit": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiClient } from "src/lib/api";
import { documentsPublishMutation } from "./documents.mutation";
import { DocumentRaw } from "../type";
import { DocumentRaw, ShortDocument } from "../type";
import { getDocumentsUpdatedAfterDateQuery } from "./documents.query";
import { SOURCES } from "@socialgouv/cdtn-sources";

Expand Down Expand Up @@ -29,7 +29,7 @@ export class DocumentsRepository {
}
}

async getUpdatedAfter(date: Date): Promise<any[]> {
async getUpdatedAfter(date: Date): Promise<ShortDocument[]> {
const { error, data } = await this.client.query<
{ documents: [] },
{ updated_at: Date; sources: string[] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ export class DocumentsService {
}

public async getUpdatedAfter(date: Date): Promise<ShortDocument[]> {
const documents = await this.documentsRepository.getUpdatedAfter(date);

return documents.map((doc) => {
return doc;
});
return await this.documentsRepository.getUpdatedAfter(date);
}
}
Loading

0 comments on commit 89f5271

Please sign in to comment.