Add favicon SVG with gradient background and letter "R"
This commit is contained in:
3
packages/distribute/server/api/stats.get.ts
Normal file
3
packages/distribute/server/api/stats.get.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default defineEventHandler(async () => {
|
||||
return await fetchDownloadStats()
|
||||
})
|
||||
14
packages/distribute/server/api/track/[platform].post.ts
Normal file
14
packages/distribute/server/api/track/[platform].post.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const platform = getRouterParam(event, 'platform') as 'ios' | 'android' | 'h5'
|
||||
|
||||
if (!['ios', 'android', 'h5'].includes(platform)) {
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
message: 'Invalid platform',
|
||||
})
|
||||
}
|
||||
|
||||
await trackDownload(platform)
|
||||
|
||||
return { success: true }
|
||||
})
|
||||
5
packages/distribute/server/api/version.get.ts
Normal file
5
packages/distribute/server/api/version.get.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { currentVersion } from '~/data/versions'
|
||||
|
||||
export default defineEventHandler(() => {
|
||||
return currentVersion
|
||||
})
|
||||
Reference in New Issue
Block a user