- npm added @japa/api-client, @japa/assert, @types/supertest
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m13s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m13s
- webpack added opions['__VUE_PROD_HYDRATION_MISMATCH_DETAILS__'] = false; - bodyparser config replaced whitelistedMethods with allowedMethods - extended stardust_provider - adapted tests for adonisjs v6
This commit is contained in:
parent
296c8fd46e
commit
bee76f8d5b
23 changed files with 2014 additions and 165 deletions
|
@ -88,13 +88,17 @@ export default class UserController {
|
|||
}
|
||||
|
||||
public async disableTwoFactorAuthentication({ auth, response, session }: HttpContext): Promise<void> {
|
||||
const user = auth.user;
|
||||
const user: User | undefined = auth.user;
|
||||
|
||||
user.twoFactorSecret = null;
|
||||
user.twoFactorRecoveryCodes = null;
|
||||
await user.save();
|
||||
|
||||
session.flash('message', 'Two factor authentication disabled.');
|
||||
if (user) {
|
||||
user.twoFactorSecret = null;
|
||||
user.twoFactorRecoveryCodes = null;
|
||||
await user.save();
|
||||
session.flash('message', 'Two-factor authentication disabled.');
|
||||
} else {
|
||||
session.flash('error', 'User not found.');
|
||||
}
|
||||
|
||||
return response.redirect().back();
|
||||
// return inertia.render('Auth/AccountInfo', {
|
||||
// // status: {
|
||||
|
|
|
@ -38,7 +38,6 @@ import drive from '#services/drive';
|
|||
import { Exception } from '@adonisjs/core/exceptions';
|
||||
import { MultipartFile } from '@adonisjs/core/types/bodyparser';
|
||||
import * as crypto from 'crypto';
|
||||
import app from '@adonisjs/core/services/app';
|
||||
interface Dictionary {
|
||||
[index: string]: string;
|
||||
}
|
||||
|
@ -446,7 +445,7 @@ export default class DatasetController {
|
|||
const mimeType = file.headers['content-type'] || 'application/octet-stream'; // Fallback to a default MIME type
|
||||
const datasetFolder = `files/${dataset.id}`;
|
||||
// const size = file.size;
|
||||
await file.move(app.makePath(datasetFolder), {
|
||||
await file.move(drive.makePath(datasetFolder), {
|
||||
name: fileName,
|
||||
overwrite: true, // overwrite in case of conflict
|
||||
});
|
||||
|
@ -918,10 +917,13 @@ export default class DatasetController {
|
|||
}
|
||||
|
||||
// move to disk:
|
||||
const fileName = `file-${cuid()}.${fileData.extname}`;
|
||||
const datasetFolder = `files/${dataset.id}`;
|
||||
await fileData.moveToDisk(datasetFolder, { name: fileName, overwrite: true }, 'local');
|
||||
// let path = coverImage.filePath;
|
||||
const fileName = `file-${cuid()}.${fileData.extname}`; //'file-ls0jyb8xbzqtrclufu2z2e0c.pdf'
|
||||
const datasetFolder = `files/${dataset.id}`; // 'files/307'
|
||||
// await fileData.moveToDisk(datasetFolder, { name: fileName, overwrite: true }, 'local');
|
||||
await fileData.move(drive.makePath(datasetFolder), {
|
||||
name: fileName,
|
||||
overwrite: true, // overwrite in case of conflict
|
||||
});
|
||||
|
||||
//save to db:
|
||||
const { clientFileName, sortOrder } = this.extractVariableNameAndSortOrder(fileData.clientName);
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue