aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account')
-rw-r--r--server/models/account/account-interface.ts2
-rw-r--r--server/models/account/account.ts6
2 files changed, 5 insertions, 3 deletions
diff --git a/server/models/account/account-interface.ts b/server/models/account/account-interface.ts
index d49dfbe17..73701f233 100644
--- a/server/models/account/account-interface.ts
+++ b/server/models/account/account-interface.ts
@@ -10,7 +10,7 @@ export namespace AccountMethods {
10 10
11 export type Load = (id: number) => Bluebird<AccountInstance> 11 export type Load = (id: number) => Bluebird<AccountInstance>
12 export type LoadByUUID = (uuid: string) => Bluebird<AccountInstance> 12 export type LoadByUUID = (uuid: string) => Bluebird<AccountInstance>
13 export type LoadByUrl = (url: string) => Bluebird<AccountInstance> 13 export type LoadByUrl = (url: string, transaction?: Sequelize.Transaction) => Bluebird<AccountInstance>
14 export type LoadAccountByPodAndUUID = (uuid: string, podId: number, transaction: Sequelize.Transaction) => Bluebird<AccountInstance> 14 export type LoadAccountByPodAndUUID = (uuid: string, podId: number, transaction: Sequelize.Transaction) => Bluebird<AccountInstance>
15 export type LoadLocalAccountByNameAndPod = (name: string, host: string) => Bluebird<AccountInstance> 15 export type LoadLocalAccountByNameAndPod = (name: string, host: string) => Bluebird<AccountInstance>
16 export type ListOwned = () => Bluebird<AccountInstance[]> 16 export type ListOwned = () => Bluebird<AccountInstance[]>
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index daf8f4703..7ce97b2fd 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -198,6 +198,7 @@ export default function defineAccount (sequelize: Sequelize.Sequelize, DataTypes
198 loadApplication, 198 loadApplication,
199 load, 199 load,
200 loadByUUID, 200 loadByUUID,
201 loadByUrl,
201 loadLocalAccountByNameAndPod, 202 loadLocalAccountByNameAndPod,
202 listOwned, 203 listOwned,
203 listFollowerUrlsForApi, 204 listFollowerUrlsForApi,
@@ -480,11 +481,12 @@ loadLocalAccountByNameAndPod = function (name: string, host: string) {
480 return Account.findOne(query) 481 return Account.findOne(query)
481} 482}
482 483
483loadByUrl = function (url: string) { 484loadByUrl = function (url: string, transaction?: Sequelize.Transaction) {
484 const query: Sequelize.FindOptions<AccountAttributes> = { 485 const query: Sequelize.FindOptions<AccountAttributes> = {
485 where: { 486 where: {
486 url 487 url
487 } 488 },
489 transaction
488 } 490 }
489 491
490 return Account.findOne(query) 492 return Account.findOne(query)