1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Add ability to customize instance logo

This commit is contained in:
Chocobozzz 2025-06-19 14:25:54 +02:00
parent f5fd593976
commit c0f4de6077
No known key found for this signature in database
GPG key ID: 583A612D890159BE
96 changed files with 1910 additions and 532 deletions

View file

@ -1,5 +1,6 @@
import { isTestOrDevInstance } from '@peertube/peertube-node-utils'
import { ActorCustomPageModel } from '@server/models/account/actor-custom-page.js'
import { UploadImageModel } from '@server/models/application/upload-image.js'
import { AccountAutomaticTagPolicyModel } from '@server/models/automatic-tag/account-automatic-tag-policy.js'
import { AutomaticTagModel } from '@server/models/automatic-tag/automatic-tag.js'
import { CommentAutomaticTagModel } from '@server/models/automatic-tag/comment-automatic-tag.js'
@ -116,7 +117,6 @@ export function checkDatabaseConnectionOrDie () {
sequelizeTypescript.authenticate()
.then(() => logger.debug('Connection to PostgreSQL has been established successfully.'))
.catch(err => {
logger.error('Unable to connect to PostgreSQL database.', { err })
process.exit(-1)
})
@ -186,7 +186,8 @@ export async function initDatabaseModels (silent: boolean) {
CommentAutomaticTagModel,
AutomaticTagModel,
WatchedWordsListModel,
AccountAutomaticTagPolicyModel
AccountAutomaticTagPolicyModel,
UploadImageModel
])
// Check extensions exist in the database
@ -223,7 +224,6 @@ async function checkPostgresExtension (extension: string) {
// Try to create the extension ourselves
try {
await sequelizeTypescript.query(`CREATE EXTENSION ${extension};`, { raw: true })
} catch {
const errorMessage = `You need to enable ${extension} extension in PostgreSQL. ` +
`You can do so by running 'CREATE EXTENSION ${extension};' as a PostgreSQL super user in ${CONFIG.DATABASE.DBNAME} database.`