Visual edits and fixes, navigation sorting fix

This commit is contained in:
2024-11-23 19:18:50 +01:00
parent 2855d4ba2e
commit 20ab51a66c
8 changed files with 49 additions and 19 deletions

View File

@@ -11,8 +11,6 @@ export default defineEventHandler(async (e) => {
const id = getRouterParam(e, 'id');
const payload: Record<string, any> = await readBody(e);
console.log(payload);
if(!id)
{
setResponseStatus(e, 400);

View File

@@ -15,7 +15,11 @@ export default defineEventHandler(async (e) => {
navigable: explorerContentTable.navigable,
private: explorerContentTable.private,
order: explorerContentTable.order,
}).from(explorerContentTable).prepare().all();
}).from(explorerContentTable).all();
content.sort((a, b) => {
return a.path.split('/').length - b.path.split('/').length;
});
if(content.length > 0)
{

View File

@@ -27,11 +27,12 @@ export default defineTask({
},
async run(e) {
try {
const payload: { to: string[], message: string, subject: string } = e.payload;
const status = await transport.sendMail({
from: 'Message automatique d[any] <no-reply@peaceultime.com>',
to: ['peaceultime@peaceultime.com', 'clem31470@gmail.com'],
text: 'Ceci est un texte de mail.',
subject: 'Test',
to: payload.to,
text: payload.message,
subject: payload.subject,
});
if(status.rejected.length > 0)