Last active
October 11, 2022 17:53
-
-
Save ajcrites/29089473f8a0962a82e55e80e3fd8ba5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class SpecialsService { | |
specials: [Special] = [{} as Special]; | |
... | |
async deleteStaleSpecials() { | |
try { | |
this.specials.forEach(async (special) => { | |
if (special.stale) { | |
await this.deleteSpecial(special); | |
} | |
}); | |
} catch (err) { | |
console.error('An error occurred deleting a special', err); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment