This commit is contained in:
Benjamin Wilson
2025-02-26 19:59:33 -05:00
parent 78deb3a375
commit 7c3b31f7b3
2 changed files with 10 additions and 10 deletions
@@ -35,15 +35,15 @@ export class AddressSettingsService {
return await this.addressSettingsRepository.save({ address });
}
public async addShares(address: string, shares: number) {
return await this.addressSettingsRepository.createQueryBuilder()
.update(AddressSettingsEntity)
.set({
shares: () => `"shares" + ${shares}` // Use the actual value of shares here
})
.where('address = :address', { address })
.execute();
}
// public async addShares(address: string, shares: number) {
// return await this.addressSettingsRepository.createQueryBuilder()
// .update(AddressSettingsEntity)
// .set({
// shares: () => `"shares" + ${shares}` // Use the actual value of shares here
// })
// .where('address = :address', { address })
// .execute();
// }
public async resetBestDifficultyAndShares() {
return await this.addressSettingsRepository.update({}, {
+1 -1
View File
@@ -48,7 +48,7 @@ export class ClientService {
}
const values = Object.entries(this.heartbeatBulkUpdate).map(([key, value]) => {
return `('${value.id}', ${value.hashRate}, '${value.updatedAt.toISOString()}')`
return `('${value.id}', ${value.hashRate}, '${value.updatedAt.toISOString().slice(0, -1)}')`
}).join(',');
const query = `