upgrade.ts 531 B

123456789101112131415161718192021222324252627282930313233
  1. import http from '@/lib/http'
  2. export interface RuntimeInfo {
  3. name: string
  4. os: string
  5. arch: string
  6. ex_path: string
  7. body: string
  8. published_at: string
  9. cur_version: Info
  10. }
  11. interface Info {
  12. version: string
  13. build_id: number
  14. total_build: number
  15. short_hash: string
  16. }
  17. const upgrade = {
  18. get_latest_release(channel: string) {
  19. return http.get('/upgrade/release', {
  20. params: {
  21. channel,
  22. },
  23. })
  24. },
  25. current_version() {
  26. return http.get('/upgrade/current')
  27. },
  28. }
  29. export default upgrade