feat: Dub App integration (#21321)
Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
35 files changed
+518
-2
No files matched your search
@@ -12,6 +12,14 @@ type CredentialCreateInput = {
|
||||
delegationCredentialId?: string | null;
|
||||
};
|
||||
|
||||
type CredentialUpdateInput = {
|
||||
type?: string;
|
||||
key?: any;
|
||||
userId?: number;
|
||||
appId?: string;
|
||||
delegationCredentialId?: string | null;
|
||||
};
|
||||
|
||||
export class CredentialRepository {
|
||||
static async create(data: CredentialCreateInput) {
|
||||
const credential = await prisma.credential.create({ data: { ...data } });
|
||||
@@ -64,6 +72,13 @@ export class CredentialRepository {
|
||||
await prisma.credential.delete({ where: { id } });
|
||||
}
|
||||
|
||||
static async updateCredentialById({ id, data }: { id: number; data: CredentialUpdateInput }) {
|
||||
await prisma.credential.update({
|
||||
where: { id },
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
static async deleteAllByDelegationCredentialId({
|
||||
delegationCredentialId,
|
||||
}: {
|
||||
|
||||
Reference in new issue
Block a user