From a66c2e3252d6cca8958959966f42494ded564023 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 May 2021 08:59:59 +0200 Subject: Fix remote actor creation date --- server/models/account/account.ts | 2 -- 1 file changed, 2 deletions(-) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 312451abe..44be0fd3c 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -411,8 +411,6 @@ export class AccountModel extends Model { id: this.id, displayName: this.getDisplayName(), description: this.description, - createdAt: this.createdAt, - updatedAt: this.updatedAt, userId: this.userId ? this.userId : undefined } -- cgit v1.2.3 From e024fd6a7494b37251da1d59470324305cdb4129 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 May 2021 17:14:39 +0200 Subject: Update channel updatedAt when uploading a video --- server/models/account/account.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 44be0fd3c..d33353af7 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -411,6 +411,7 @@ export class AccountModel extends Model { id: this.id, displayName: this.getDisplayName(), description: this.description, + updatedAt: this.updatedAt, userId: this.userId ? this.userId : undefined } -- cgit v1.2.3 From 7d9ba5c08999c6482f0bc5e0c09c6f55b7724090 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 May 2021 11:15:29 +0200 Subject: Cleanup models directory organization --- server/models/account/account.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index d33353af7..7b2af706d 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -30,19 +30,19 @@ import { MAccountSummaryFormattable, MChannelActor } from '../../types/models' -import { ActorModel } from '../activitypub/actor' -import { ActorFollowModel } from '../activitypub/actor-follow' +import { ActorModel } from '../actor/actor' +import { ActorFollowModel } from '../actor/actor-follow' +import { ActorImageModel } from '../actor/actor-image' import { ApplicationModel } from '../application/application' -import { ActorImageModel } from './actor-image' import { ServerModel } from '../server/server' import { ServerBlocklistModel } from '../server/server-blocklist' +import { UserModel } from '../user/user' import { getSort, throwIfNotValid } from '../utils' import { VideoModel } from '../video/video' import { VideoChannelModel } from '../video/video-channel' import { VideoCommentModel } from '../video/video-comment' import { VideoPlaylistModel } from '../video/video-playlist' import { AccountBlocklistModel } from './account-blocklist' -import { UserModel } from './user' export enum ScopeNames { SUMMARY = 'SUMMARY' -- cgit v1.2.3 From 16c016e8b1d5ca46343d3363f9a49e24c5d7c944 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 May 2021 14:09:04 +0200 Subject: Stricter models typing --- server/models/account/account.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 7b2af706d..9db109bf8 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -17,6 +17,7 @@ import { UpdatedAt } from 'sequelize-typescript' import { ModelCache } from '@server/models/model-cache' +import { AttributesOnly } from '@shared/core-utils' import { Account, AccountSummary } from '../../../shared/models/actors' import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts' import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' @@ -141,7 +142,7 @@ export type SummaryOptions = { } ] }) -export class AccountModel extends Model { +export class AccountModel extends Model>> { @AllowNull(false) @Column -- cgit v1.2.3 From c158a5faabb8ef0bc5d121fda4522d63603e8bc5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 May 2021 14:51:17 +0200 Subject: Refactor a little bit controllers --- server/models/account/account.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 9db109bf8..665ecd595 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -21,7 +21,7 @@ import { AttributesOnly } from '@shared/core-utils' import { Account, AccountSummary } from '../../../shared/models/actors' import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts' import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' -import { sendDeleteActor } from '../../lib/activitypub/send' +import { sendDeleteActor } from '../../lib/activitypub/send/send-delete' import { MAccount, MAccountActor, -- cgit v1.2.3