})
}
-listAcceptedFollowerUrlsForApi = function (accountIds: number[], start?: number, count?: number) {
- return createListAcceptedFollowForApiQuery('followers', accountIds, start, count)
+listAcceptedFollowerUrlsForApi = function (accountIds: number[], t: Sequelize.Transaction, start?: number, count?: number) {
+ return createListAcceptedFollowForApiQuery('followers', accountIds, t, start, count)
}
-listAcceptedFollowerSharedInboxUrls = function (accountIds: number[]) {
- return createListAcceptedFollowForApiQuery('followers', accountIds, undefined, undefined, 'sharedInboxUrl')
+listAcceptedFollowerSharedInboxUrls = function (accountIds: number[], t: Sequelize.Transaction) {
+ return createListAcceptedFollowForApiQuery('followers', accountIds, t, undefined, undefined, 'sharedInboxUrl')
}
-listAcceptedFollowingUrlsForApi = function (accountIds: number[], start?: number, count?: number) {
- return createListAcceptedFollowForApiQuery('following', accountIds, start, count)
+listAcceptedFollowingUrlsForApi = function (accountIds: number[], t: Sequelize.Transaction, start?: number, count?: number) {
+ return createListAcceptedFollowForApiQuery('following', accountIds, t, start, count)
}
// ------------------------------ UTILS ------------------------------
async function createListAcceptedFollowForApiQuery (
type: 'followers' | 'following',
accountIds: number[],
+ t: Sequelize.Transaction,
start?: number,
count?: number,
columnUrl = 'url'
const options = {
bind: { accountIds },
- type: Sequelize.QueryTypes.SELECT
+ type: Sequelize.QueryTypes.SELECT,
+ transaction: t
}
tasks.push(AccountFollow['sequelize'].query(query, options))
}