-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix all eslint warn that isnt about any
- Loading branch information
1 parent
38e174e
commit a0ba78a
Showing
5 changed files
with
19 additions
and
150 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
/* eslint-disable no-process-exit */ | ||
import { getExpiredListings, updateListingStatuses } from '../services/lease-service/adapters/listing-adapter' | ||
import { | ||
getExpiredListings, | ||
updateListingStatuses, | ||
} from '../services/lease-service/adapters/listing-adapter' | ||
import { ListingStatus } from 'onecore-types' | ||
|
||
async function updateExpiredListings() { | ||
const expiredListings = await getExpiredListings(); | ||
console.log('Expired listings: ', expiredListings); | ||
if (expiredListings.length > 0) { | ||
const expiredListingsIds = expiredListings.map(l => l.Id); | ||
console.log(`Found ${expiredListingsIds} expired listings`); | ||
const updateCount = await updateListingStatuses(expiredListingsIds, ListingStatus.Expired); | ||
console.log(`Updated ${updateCount} expired listings`); | ||
} | ||
console.log('Expired listings updated successfully') | ||
process.exit(0); | ||
const expiredListings = await getExpiredListings() | ||
console.log('Expired listings: ', expiredListings) | ||
if (expiredListings.length > 0) { | ||
const expiredListingsIds = expiredListings.map((l) => l.Id) | ||
console.log(`Found ${expiredListingsIds} expired listings`) | ||
const updateCount = await updateListingStatuses( | ||
expiredListingsIds, | ||
ListingStatus.Expired | ||
) | ||
console.log(`Updated ${updateCount} expired listings`) | ||
} | ||
console.log('Expired listings updated successfully') | ||
process.exit(0) | ||
} | ||
|
||
updateExpiredListings(); | ||
updateExpiredListings() |
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
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
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