mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 09:55:43 -04:00
refactor: replace TypeORM with knex.js
Co-authored-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
74d50daa0b
commit
c9faf81e27
242 changed files with 4601 additions and 6871 deletions
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { AuthProviderType } from '@hedgedoc/commons';
|
||||
import { Knex } from 'knex';
|
||||
|
||||
import { ProviderType } from '../../auth/provider-type.enum';
|
||||
import { hashPassword } from '../../utils/password';
|
||||
import {
|
||||
FieldNameIdentity,
|
||||
|
@ -24,7 +24,7 @@ export async function seed(knex: Knex): Promise<void> {
|
|||
{
|
||||
[FieldNameUser.username]: null,
|
||||
[FieldNameUser.guestUuid]: '55b4618a-d5f3-4320-93d3-f3501c73d72b',
|
||||
[FieldNameUser.displayName]: null,
|
||||
[FieldNameUser.displayName]: 'Gast 1',
|
||||
[FieldNameUser.photoUrl]: null,
|
||||
[FieldNameUser.email]: null,
|
||||
[FieldNameUser.authorStyle]: 1,
|
||||
|
@ -40,7 +40,7 @@ export async function seed(knex: Knex): Promise<void> {
|
|||
]);
|
||||
await knex(TableIdentity).insert({
|
||||
[FieldNameIdentity.userId]: 2,
|
||||
[FieldNameIdentity.providerType]: ProviderType.LOCAL,
|
||||
[FieldNameIdentity.providerType]: AuthProviderType.LOCAL,
|
||||
[FieldNameIdentity.providerIdentifier]: null,
|
||||
[FieldNameIdentity.providerUserId]: null,
|
||||
[FieldNameIdentity.passwordHash]: await hashPassword('test123'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue