Skip to content

Commit 314e4b0

Browse files
committed
remove unused benchmarks & version api
1 parent 2922599 commit 314e4b0

2 files changed

Lines changed: 1 addition & 25 deletions

File tree

client/src/api/application.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ import axios, { AxiosResponse } from "axios"
44
import { User } from '@/types/user'
55

66
// Paths
7-
const benchmarksPath = `/benchmarks`
87
const userPath = `/user`
9-
const versionPath = `/version`
108

119
// Custom types
12-
type BenchmarksResponse = AxiosResponse<string>
1310
type UserResponse = AxiosResponse<User>
14-
type VersionResponse = AxiosResponse<string>
1511

1612
// Public methods
1713
/**
@@ -20,11 +16,3 @@ type VersionResponse = AxiosResponse<string>
2016
export function getUser(): Promise<UserResponse> {
2117
return axios.get(userPath)
2218
}
23-
24-
export function getBenchmarks(): Promise<BenchmarksResponse> {
25-
return axios.get(benchmarksPath)
26-
}
27-
28-
export function getVersion(): Promise<VersionResponse> {
29-
return axios.get(versionPath)
30-
}

client/src/stores/app.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Libraries & stores
22
import { ref } from "vue"
33
import { defineStore } from "pinia"
4-
import yaml from 'js-yaml'
54
import { AxiosError } from "axios"
6-
// Types & API
7-
import * as API from "@/api/application"
85

96
// Custom types
107
type ErrorMessage = {
@@ -17,7 +14,6 @@ type ErrorMessage = {
1714
*/
1815
const useApp = defineStore('app', () => {
1916
// Fields
20-
const benchmarks = ref("" as string)
2117
const errors = ref([] as string[])
2218

2319
// Methods
@@ -50,16 +46,8 @@ const useApp = defineStore('app', () => {
5046
}
5147
}
5248

53-
function fetchBenchmarks() {
54-
API.getBenchmarks()
55-
.then(response => {
56-
benchmarks.value = yaml.load(response.data) as string
57-
})
58-
.catch(error => handleServerError("fetch benchmarks", error))
59-
}
60-
6149
// Exports
62-
return { benchmarks, errors, resetErrors, fetchBenchmarks, handleServerError }
50+
return { errors, resetErrors, handleServerError }
6351
})
6452

6553
export default useApp

0 commit comments

Comments
 (0)