mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
Added about page
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import {
|
||||
HabitsData,
|
||||
CoinsData,
|
||||
CoinTransaction,
|
||||
TransactionType,
|
||||
import {
|
||||
HabitsData,
|
||||
CoinsData,
|
||||
CoinTransaction,
|
||||
TransactionType,
|
||||
WishlistItemType,
|
||||
WishlistData,
|
||||
Settings,
|
||||
@@ -163,3 +163,13 @@ export async function removeCoins(
|
||||
await saveCoinsData(newData)
|
||||
return newData
|
||||
}
|
||||
|
||||
export async function getChangelog(): Promise<string> {
|
||||
try {
|
||||
const changelogPath = path.join(process.cwd(), 'CHANGELOG.md')
|
||||
return await fs.readFile(changelogPath, 'utf8')
|
||||
} catch (error) {
|
||||
console.error('Error loading changelog:', error)
|
||||
return '# Changelog\n\nNo changelog available.'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user