Storage: add function to get mapping by matrix ID
This commit is contained in:
parent
6519732e89
commit
d2543dca2f
@ -25,6 +25,12 @@ export function getMapping(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getMappingByMatrixId(id: string): Promise<IdMapping | null> {
|
||||||
|
return AppDataSource.manager.findOneBy(IdMapping, {
|
||||||
|
matrixId: id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export async function save(entity: IdMapping | Membership): Promise<void> {
|
export async function save(entity: IdMapping | Membership): Promise<void> {
|
||||||
await AppDataSource.manager.save(entity)
|
await AppDataSource.manager.save(entity)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user