aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/account/account-blocklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 13:52:49 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 14:53:42 +0200
commit0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch)
tree1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/account/account-blocklist.ts
parent96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff)
downloadPeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip
Cleanup model types
Diffstat (limited to 'server/typings/models/account/account-blocklist.ts')
-rw-r--r--server/typings/models/account/account-blocklist.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/typings/models/account/account-blocklist.ts b/server/typings/models/account/account-blocklist.ts
index 6d1771de8..d20d97aa8 100644
--- a/server/typings/models/account/account-blocklist.ts
+++ b/server/typings/models/account/account-blocklist.ts
@@ -2,10 +2,16 @@ import { AccountBlocklistModel } from '../../../models/account/account-blocklist
2import { PickWith } from '../../utils' 2import { PickWith } from '../../utils'
3import { MAccountDefault } from './account' 3import { MAccountDefault } from './account'
4 4
5type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M>
6
7// ############################################################################
8
5export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'> 9export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'>
6 10
11// ############################################################################
12
7export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'> 13export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'>
8 14
9export type MAccountBlocklistAccounts = MAccountBlocklist & 15export type MAccountBlocklistAccounts = MAccountBlocklist &
10 PickWith<AccountBlocklistModel, 'ByAccount', MAccountDefault> & 16 Use<'ByAccount', MAccountDefault> &
11 PickWith<AccountBlocklistModel, 'BlockedAccount', MAccountDefault> 17 Use<'BlockedAccount', MAccountDefault>