mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
fix: postgre -> postgres (#9814)
This commit is contained in:
parent
30704e6de8
commit
f3c5edc852
4 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
import { loadConfig } from './built/config.js';
|
import { loadConfig } from './built/config.js';
|
||||||
import { entities } from './built/postgre.js';
|
import { entities } from './built/postgres.js';
|
||||||
|
|
||||||
const config = loadConfig();
|
const config = loadConfig();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { DataSource } from 'typeorm';
|
||||||
import { createRedisConnection } from '@/redis.js';
|
import { createRedisConnection } from '@/redis.js';
|
||||||
import { DI } from './di-symbols.js';
|
import { DI } from './di-symbols.js';
|
||||||
import { loadConfig } from './config.js';
|
import { loadConfig } from './config.js';
|
||||||
import { createPostgreDataSource } from './postgre.js';
|
import { createPostgresDataSource } from './postgres.js';
|
||||||
import { RepositoryModule } from './models/RepositoryModule.js';
|
import { RepositoryModule } from './models/RepositoryModule.js';
|
||||||
import type { Provider, OnApplicationShutdown } from '@nestjs/common';
|
import type { Provider, OnApplicationShutdown } from '@nestjs/common';
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ const $config: Provider = {
|
||||||
const $db: Provider = {
|
const $db: Provider = {
|
||||||
provide: DI.db,
|
provide: DI.db,
|
||||||
useFactory: async (config) => {
|
useFactory: async (config) => {
|
||||||
const db = createPostgreDataSource(config);
|
const db = createPostgresDataSource(config);
|
||||||
return await db.initialize();
|
return await db.initialize();
|
||||||
},
|
},
|
||||||
inject: [DI.config],
|
inject: [DI.config],
|
||||||
|
|
|
@ -197,7 +197,7 @@ export const entities = [
|
||||||
|
|
||||||
const log = process.env.NODE_ENV !== 'production';
|
const log = process.env.NODE_ENV !== 'production';
|
||||||
|
|
||||||
export function createPostgreDataSource(config: Config) {
|
export function createPostgresDataSource(config: Config) {
|
||||||
return new DataSource({
|
return new DataSource({
|
||||||
type: 'postgres',
|
type: 'postgres',
|
||||||
host: config.db.host,
|
host: config.db.host,
|
|
@ -11,7 +11,7 @@ import FormData from 'form-data';
|
||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
import got, { RequestError } from 'got';
|
import got, { RequestError } from 'got';
|
||||||
import loadConfig from '../src/config/load.js';
|
import loadConfig from '../src/config/load.js';
|
||||||
import { entities } from '../src/postgre.js';
|
import { entities } from '@/postgres.js';
|
||||||
import type * as misskey from 'misskey-js';
|
import type * as misskey from 'misskey-js';
|
||||||
|
|
||||||
const _filename = fileURLToPath(import.meta.url);
|
const _filename = fileURLToPath(import.meta.url);
|
||||||
|
|
Loading…
Reference in a new issue