More TypeScript :)
All checks were successful
pipeline / build-and-push-images (push) Successful in 22s
pipeline / deploy (push) Successful in 7s

This commit is contained in:
2024-11-29 18:39:32 +01:00
parent 0d50eb3085
commit b87e0db676
2 changed files with 6 additions and 5 deletions

View File

@@ -7,11 +7,11 @@ async function connectToDatabase() {
return client
}
async function fetchLatestPatch(client) {
async function fetchLatestPatch(client : MongoClient) {
const database = client.db("patches");
const patches = database.collection("patches");
const latestPatch = await patches.find().limit(1).sort({date:-1}).next()
return latestPatch.patch
return latestPatch!!.patch as string
}
export {connectToDatabase, fetchLatestPatch}