import { DataSource } from 'typeorm';
import { AuthUserEntity } from '../../../entities';

export async function handleUpdateUserSigningPublicKey(
  dataSource: DataSource,
  userId: string,
  signingPublicKey: string
): Promise<void> {
  const repo = dataSource.getRepository(AuthUserEntity);

  await repo.update({ id: userId }, { signingPublicKey });
}
