mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability to update the banner
This commit is contained in:
@@ -72,7 +72,11 @@ export class ActorImageModel extends Model {
|
||||
}
|
||||
|
||||
getStaticPath () {
|
||||
return join(LAZY_STATIC_PATHS.AVATARS, this.filename)
|
||||
if (this.type === ActorImageType.AVATAR) {
|
||||
return join(LAZY_STATIC_PATHS.AVATARS, this.filename)
|
||||
}
|
||||
|
||||
return join(LAZY_STATIC_PATHS.BANNERS, this.filename)
|
||||
}
|
||||
|
||||
getPath () {
|
||||
|
||||
@@ -71,6 +71,7 @@ import { VideoLiveModel } from '../video/video-live'
|
||||
import { VideoPlaylistModel } from '../video/video-playlist'
|
||||
import { AccountModel } from './account'
|
||||
import { UserNotificationSettingModel } from './user-notification-setting'
|
||||
import { ActorImageModel } from './actor-image'
|
||||
|
||||
enum ScopeNames {
|
||||
FOR_ME_API = 'FOR_ME_API',
|
||||
@@ -97,7 +98,20 @@ enum ScopeNames {
|
||||
model: AccountModel,
|
||||
include: [
|
||||
{
|
||||
model: VideoChannelModel
|
||||
model: VideoChannelModel.unscoped(),
|
||||
include: [
|
||||
{
|
||||
model: ActorModel,
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: ActorImageModel,
|
||||
as: 'Banner',
|
||||
required: false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
attributes: [ 'id', 'name', 'type' ],
|
||||
|
||||
Reference in New Issue
Block a user