mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
back port some changes from postgres
This commit is contained in:
@@ -14,9 +14,9 @@ export class AddressSettingsService {
|
||||
|
||||
}
|
||||
|
||||
public async getSettings(address: string) {
|
||||
public async getSettings(address: string, createIfNotFound: boolean) {
|
||||
const settings = await this.addressSettingsRepository.findOne({ where: { address } });
|
||||
if (settings == null) {
|
||||
if (createIfNotFound == true && settings == null) {
|
||||
return await this.createNew(address);
|
||||
}
|
||||
return settings;
|
||||
|
||||
Reference in New Issue
Block a user