Skip to content

Commit

Permalink
v3.4.18
Browse files Browse the repository at this point in the history
  • Loading branch information
gruppler committed Aug 11, 2024
2 parents 02279a5 + 3ada08b commit bdd02ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
25 changes: 9 additions & 16 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,21 @@ exports.short = functions.https.onRequest(async (request, response) => {
return true;
});

/* // Delete expired shortened URLs
// Delete expired shortened URLs
exports.urlCleanup = functions.pubsub
.schedule("every day 00:00")
.onRun(async () => {
const LIMIT = new Date(Date.now() - 5 * 365 * 864e5);
const LIMIT = new Date(Date.now() - 30 * 864e5);

// Last accessed over 5 years ago
// Never accessed, created over 30 days ago
let expiredURLs = (
await db.collection("urls").where("accessed", "<=", LIMIT).get()
await db
.collection("urls")
.where("accessed", "==", null)
.where("created", "<=", LIMIT)
.get()
).docs;

// Never accessed, created over 5 years ago
expiredURLs = expiredURLs.concat(
(
await db
.collection("urls")
.where("accessed", "==", null)
.where("created", "<=", LIMIT)
.get()
).docs
);
// Filter out permanent URLs
expiredURLs = expiredURLs.filter((doc) => !doc.data().isPermanent);

Expand All @@ -120,7 +113,7 @@ exports.urlCleanup = functions.pubsub

async function deleteExpiredURL(doc) {
return db.collection("urls").doc(doc.id).delete();
} */
}

//#region PNG/GIF

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": "ptn-ninja",
"version": "3.4.17",
"version": "3.4.18",
"description": "An editor and viewer for Portable Tak Notation",
"productName": "PTN Ninja",
"author": "Craig Laparo <gruppler+github@gmail.com>",
Expand Down
4 changes: 3 additions & 1 deletion src/components/board/Board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ export default {
this.isDialogOpen ||
this.isHighlighting ||
this.isEditingTPS ||
($gameSelector && $gameSelector.$refs.select.menu)
($gameSelector &&
$gameSelector.$refs.select &&
$gameSelector.$refs.select.menu)
);
},
cols() {
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en-us/about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PTN Ninja

**Version [3.4.17](https://github.com/gruppler/PTN-Ninja/releases)**
**Version [3.4.18](https://github.com/gruppler/PTN-Ninja/releases)**

This is an editor and viewer for [Portable Tak Notation (PTN)](https://ustak.org/portable-tak-notation/). It aims to be...

Expand Down

0 comments on commit bdd02ec

Please sign in to comment.