fix(medusa): Use correct auth middleware in GET /store/auth (#2687)
* use correct authentication middleware * remove guard from get-session since it's guarded by middleware doing the same check * Add integration tests * Create lazy-swans-agree.md Co-authored-by: olivermrbl <oliver@mrbltech.com> Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
olivermrbl
Oliver Windall Juhl
parent
e18b59de66
commit
70a8d3450f
@@ -3,13 +3,14 @@ import faker from "faker"
|
||||
import { Connection } from "typeorm"
|
||||
import {
|
||||
CustomerGroupFactoryData,
|
||||
simpleCustomerGroupFactory,
|
||||
simpleCustomerGroupFactory
|
||||
} from "./simple-customer-group-factory"
|
||||
|
||||
export type CustomerFactoryData = {
|
||||
id?: string
|
||||
email?: string
|
||||
groups?: CustomerGroupFactoryData[]
|
||||
password_hash?: string
|
||||
}
|
||||
|
||||
export const simpleCustomerFactory = async (
|
||||
@@ -29,6 +30,11 @@ export const simpleCustomerFactory = async (
|
||||
email: data.email,
|
||||
})
|
||||
|
||||
if (data.password_hash) {
|
||||
c.password_hash = data.password_hash
|
||||
c.has_account = true
|
||||
}
|
||||
|
||||
const customer = await manager.save(c)
|
||||
|
||||
if (data.groups) {
|
||||
|
||||
Reference in New Issue
Block a user