address best diff

This commit is contained in:
Ben Wilson
2023-07-24 22:23:29 -04:00
parent 8369e9eef2
commit a4b4e517cb
7 changed files with 48 additions and 16 deletions
@@ -14,4 +14,15 @@ export class AddressSettingsService {
}
public async getSettings(address: string) {
return await this.addressSettingsRepository.findOne({ where: { address } });
}
public async updateBestDifficulty(address: string, bestDifficulty: number) {
return await this.addressSettingsRepository.update({ address }, { bestDifficulty });
}
public async createNew(address: string) {
return await this.addressSettingsRepository.save({ address });
}
}