mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
timestamp sorting
This commit is contained in:
committed by
Aiden McClelland
parent
90b412384a
commit
d7508345eb
@@ -83,7 +83,12 @@ export class LiveApiService extends ApiService {
|
||||
}
|
||||
|
||||
async getAvailableApps (): Promise<AppAvailablePreview[]> {
|
||||
return this.authRequest<ReqRes.GetAppsAvailableRes>({ method: Method.GET, url: '/apps/store' })
|
||||
const res = await this.authRequest<ReqRes.GetAppsAvailableRes>({ method: Method.GET, url: '/apps/store' })
|
||||
return res.map(a => {
|
||||
const latestVersionTimestamp = new Date(a.latestVersionTimestamp)
|
||||
if (isNaN(latestVersionTimestamp as any)) throw new Error(`Invalid latestVersionTimestamp ${a.latestVersionTimestamp}`)
|
||||
return { ...a, latestVersionTimestamp }
|
||||
})
|
||||
}
|
||||
|
||||
async getAvailableApp (appId: string): Promise<AppAvailableFull> {
|
||||
|
||||
Reference in New Issue
Block a user