Skip to content

Commit

Permalink
Update for new schema
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Feb 11, 2024
1 parent fb655f3 commit a2090b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/helpers/getDatabaseData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export async function getDatabaseData() {
const latestDate = (
await prisma.scrapeProgress.findFirst({
orderBy: {
newestDate: 'desc',
newestScraped: 'desc',
},
})
)?.newestDate;
)?.newestScraped;
if (!latestDate) {
throw new Error(`No latest date found`);
}
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { addAllAssetsToDictionary } from './yomitan/addAllAssetsToDictionary';
(async () => {
const devMode = isDevMode();

const { latestDateShort, allArticles } = await getDatabaseData();
const { allArticles } = await getDatabaseData();

// YYYY-MM-DD
const latestDateShort = new Date().toISOString().split('T')[0];

// If dev mode, limit to 5 articles
if (devMode) {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "./build/" /* Specify an output folder for all emitted files. */,
Expand Down

0 comments on commit a2090b4

Please sign in to comment.