feat(medusa): Migrate services to use TransactionBaseService (#2276)

This commit is contained in:
Adrien de Peretti authored and GitHub committed 2022-09-29 15:58:17 +02:00
1 parent 8797a1441b
commit 678a06752a
45 files changed
+317 -586

No files matched your search

+2 -3
View File
@@ -1,6 +1,6 @@
import Scrypt from "scrypt-kdf"
import { AuthenticateResult } from "../types/auth"
import { User, Customer } from "../models"
import { Customer, User } from "../models"
import { TransactionBaseService } from "../interfaces"
import UserService from "./user"
import CustomerService from "./customer"
@@ -14,7 +14,6 @@ type InjectedDependencies = {
/**
* Can authenticate a user based on email password combination
* @extends BaseService
*/
class AuthService extends TransactionBaseService {
protected manager_: EntityManager
@@ -23,7 +22,7 @@ class AuthService extends TransactionBaseService {
protected readonly customerService_: CustomerService
constructor({ manager, userService, customerService }: InjectedDependencies) {
super({ manager, userService, customerService })
super(arguments[0])
this.manager_ = manager
this.userService_ = userService