Skip to content

Commit

Permalink
Update airlines expiration date
Browse files Browse the repository at this point in the history
  • Loading branch information
daniluk4000 committed Jan 10, 2025
1 parent e5b50de commit 8f586cb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# [1.0.0-1]

Initial changelog

# [1.0.0]

This update marks an important milestone for VATSIM Radar.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vatsim-radar",
"version": "1.0.0",
"version": "1.0.0-1",
"private": true,
"type": "module",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/composables/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ export async function setupDataFetch({ onFetch, onSuccessCallback }: {
}()),
(async function() {
let airlines = await clientDB.get('data', 'airlines') as IDBAirlinesData['value'] | undefined;
if (!airlines || Date.now() > airlines.expiresAt) {
if (!airlines || !airlines.expirationDate || Date.now() > airlines.expirationDate) {
const data = await $fetch<RadarDataAirlinesList>('/api/data/airlines');
airlines = {
expiresAt: Date.now() + (1000 * 60 * 60 * 24 * 30),
expirationDate: Date.now() + (1000 * 60 * 60 * 24 * 7),
airlines: data,
};
await clientDB.put('data', airlines, 'airlines');
Expand Down
Empty file modified src/server/api/auth/navigraph/index.ts
100755 → 100644
Empty file.
Empty file modified src/server/api/auth/navigraph/redirect.ts
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/utils/client-db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface VatglassesData {
export interface IDBAirlinesData {
key: 'airlines';
value: {
expiresAt: number;
expirationDate: number;
airlines: RadarDataAirlinesList;
};
}
Expand Down

0 comments on commit 8f586cb

Please sign in to comment.