style: run prettier

This commit is contained in:
parent f0346ebdbd
commit 6167a9ea70
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
3 changed files with 38 additions and 39 deletions

@ -1,7 +1,3 @@
export default defineEventHandler((event) => { export default defineEventHandler((event) => {
return [ return ["Slash", "Het", "Gen"];
'Slash', });
'Het',
'Gen'
]
})

@ -1,10 +1,10 @@
import mongoose from "mongoose"; import mongoose from "mongoose";
import { Story } from "~/models/stories"; import { Story } from "~/models/stories";
export default eventHandler(async (event) => { export default eventHandler(async (event) => {
let aa = mongoose.connection.db.collection("z_index_totAuthors"); let aa = mongoose.connection.db.collection("z_index_totAuthors");
let totalStories = await Story.countDocuments({"chapters.hidden": false}); let totalStories = await Story.countDocuments({ "chapters.hidden": false });
let totalAuthors = await aa.countDocuments(); let totalAuthors = await aa.countDocuments();
return {stories: totalStories, authors: totalAuthors} return { stories: totalStories, authors: totalAuthors };
}) });

@ -1,22 +1,25 @@
import { Ficmas } from "~/models/challenges/ficmas"; import { Ficmas } from "~/models/challenges/ficmas";
export default eventHandler(async (event) => { export default eventHandler(async (event) => {
let y = new Date().getFullYear() let y = new Date().getFullYear();
let fmfilt: any = {}; let fmfilt: any = {};
if (!!process.env.JulyFicmas && new Date() < new Date(Date.parse('Aug 1 ' + y))) { if (
fmfilt.isAnniversary = true; !!process.env.JulyFicmas &&
fmfilt.year = y; new Date() < new Date(Date.parse("Aug 1 " + y))
} else if (new Date() < new Date(Date.parse('Dec 25 ' + y))) { ) {
fmfilt.year = process.env.YEAR; fmfilt.isAnniversary = true;
fmfilt.isAnniversary = false; fmfilt.year = y;
} else { } else if (new Date() < new Date(Date.parse("Dec 25 " + y))) {
fmfilt.keythatdoesntexist = { fmfilt.year = process.env.YEAR;
$exists: true fmfilt.isAnniversary = false;
} } else {
} fmfilt.keythatdoesntexist = {
let ficmasarray_raw = await Ficmas.find(fmfilt) $exists: true,
// console.log(ficsHidden()); };
// console.log(query); }
event.context.ficmasarray_raw = ficmasarray_raw let ficmasarray_raw = await Ficmas.find(fmfilt);
}) // console.log(ficsHidden());
// console.log(query);
event.context.ficmasarray_raw = ficmasarray_raw;
});