- add methods for releasing datasets from submitter
All checks were successful
CI Pipeline / japa-tests (push) Successful in 54s

- npm updates
- side menu with child items
- flash messages via HttpContext response (extended via macro)
This commit is contained in:
Kaimbacher 2023-06-27 18:23:18 +02:00
parent e0ff71b117
commit f403c3109f
37 changed files with 1020 additions and 482 deletions

View file

@ -1,6 +1,6 @@
import { HashDriverContract } from "@ioc:Adonis/Core/Hash";
import { HashDriverContract } from '@ioc:Adonis/Core/Hash';
// const bcrypt = require("bcrypt");
import bcrypt from "bcryptjs";
import bcrypt from 'bcryptjs';
const saltRounds = 10;
export class LaravelHash implements HashDriverContract {
@ -11,11 +11,11 @@ export class LaravelHash implements HashDriverContract {
public async verify(hashedValue: string, plainValue: string) {
let newHash: string;
if (hashedValue.includes("$2y$10$")) {
newHash = hashedValue.replace("$2y$10$", "$2a$10$");
if (hashedValue.includes('$2y$10$')) {
newHash = hashedValue.replace('$2y$10$', '$2a$10$');
} else {
newHash = hashedValue;
}
return await bcrypt.compareSync(plainValue, newHash);
}
}
}