Skip to content

Commit 8900f30

Browse files
Copilotalexanmtz
andauthored
Move util module from src/modules/util to src/utils (#1382)
* Initial plan * Move src/modules/util to src/utils and update all references Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com> * Fix all remaining util import paths in modules and utils directories Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexanmtz <88840+alexanmtz@users.noreply.github.com>
1 parent c988c44 commit 8900f30

18 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/mail/paymentRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import request from './request'
22
import i18n from 'i18n'
33
import moment from 'moment'
4-
import formatDate from '../modules/util/formatDate'
4+
import formatDate from '../utils/formatDate'
55
import emailTemplate from './templates/base-content'
66
import { tableContentEmailTemplate } from './templates/table-content'
7-
import currencyInfo from '../modules/util/currency-info'
8-
import { handleAmount } from '../modules/util/handle-amount/handle-amount'
7+
import currencyInfo from '../utils/currency-info'
8+
import { handleAmount } from '../utils/handle-amount/handle-amount'
99

1010
type CurrencyKey = keyof typeof currencyInfo
1111

src/mail/payout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import i18n from 'i18n'
22
import request from './request'
3-
import { handleAmount } from '../modules/util/handle-amount/handle-amount'
3+
import { handleAmount } from '../utils/handle-amount/handle-amount'
44
import moment from 'moment'
55
import { tableContentEmailTemplate } from './templates/table-content'
6-
import currencyInfo from '../modules/util/currency-info'
6+
import currencyInfo from '../utils/currency-info'
77

88
const PayoutMail: any = {
99
payoutCreated: async function (user: any, payout: any) {

src/mail/templates/issue/claim.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import i18n from 'i18n'
22
import request from '../../request'
33
import { tableContentEmailTemplate, type ActionButton } from '../table-content'
4-
import currencyInfo from '../../../modules/util/currency-info'
4+
import currencyInfo from '../../../utils/currency-info'
55

66
const ClaimMail: any = {
77
notifyUnclaimedBounties: async function (user: any, issue: any, pullRequest: any) {

src/modules/orders/orderRefund.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import models from '../../models'
22
import PaymentMail from '../../mail/payment'
33
import requestPromise from 'request-promise'
4-
import { handleAmount } from '../util/handle-amount/handle-amount'
4+
import { handleAmount } from '../../utils/handle-amount/handle-amount'
55
import stripeModule from '../../client/payment/stripe'
66
const stripe = stripeModule()
77

src/modules/payouts/payoutRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import models from '../../models'
22
import Stripe from '../../client/payment/stripe'
3-
import { handleAmount } from '../util/handle-amount/handle-amount'
3+
import { handleAmount } from '../../utils/handle-amount/handle-amount'
44

55
const stripe = Stripe()
66

src/modules/users/userBankAccountCreate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import models from '../../models'
22
import stripeModule from '../../client/payment/stripe'
33
const stripe = stripeModule()
4-
import { currencyMap } from '../util/currency-map'
4+
import { currencyMap } from '../../utils/currency-map'
55

66
const currentModels = models as any
77

src/modules/walletOrders/walletOrderBuilds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import stripe from '../../client/payment/stripe'
22
import models from '../../models'
3-
import { createOrUpdateCustomer } from '../util/customer'
3+
import { createOrUpdateCustomer } from '../../utils/customer'
44

55
const currentModels = models as any
66
const stripeInstance = stripe()

src/modules/webhooks/charges/chargeRefunded/chargeRefundedPaymentRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Models from '../../../../models'
22
import PaymentRequestMail from '../../../../mail/paymentRequest'
33
import Stripe from '../../../../client/payment/stripe'
4-
import { handleAmount } from '../../../util/handle-amount/handle-amount'
4+
import { handleAmount } from '../../../../utils/handle-amount/handle-amount'
55

66
const stripe = Stripe()
77
const models = Models as any

src/modules/webhooks/checkoutSessionCompleted.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if (process.env.NODE_ENV !== 'production') {
44
}
55
import Stripe from '../../client/payment/stripe'
66
import Models from '../../models'
7-
import { handleAmount } from '../util/handle-amount/handle-amount'
7+
import { handleAmount } from '../../utils/handle-amount/handle-amount'
88
import PaymentRequestMail from '../../mail/paymentRequest'
99

1010
const stripe = Stripe()

src/scripts/sync/sync_payment_requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Stripe from '../../client/payment/stripe'
22
import Models from '../../models'
33
import { UUIDV4 } from 'sequelize'
4-
import { handleAmount } from '../../modules/util/handle-amount/handle-amount'
4+
import { handleAmount } from '../../utils/handle-amount/handle-amount'
55

66
const models = Models as any
77

0 commit comments

Comments
 (0)