Skip to content

Commit 0a31d9a

Browse files
committed
fix: partial revert of 41b336e
Signed-off-by: Pedro Lamas <[email protected]>
1 parent 41b336e commit 0a31d9a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/store/config/getters.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { ConfigState, TemperaturePreset } from './types'
33
import type { RootState } from '../types'
44
import type { Heater, Fan } from '../printer/types'
55
import type { AppDataTableHeader } from '@/types'
6+
import md5 from 'md5'
67

78
export const getters = {
89
getCurrentInstance: (state) => {
@@ -104,5 +105,14 @@ export const getters = {
104105
...header,
105106
...configuredHeaders.find(p => p.value === header.value)
106107
}))
108+
},
109+
110+
getTokenKeys: (state) => {
111+
const url = state.apiUrl
112+
const hash = (url) ? md5(url) : ''
113+
return {
114+
'user-token': `user-token-${hash}`,
115+
'refresh-token': `refresh-token-${hash}`
116+
}
107117
}
108118
} satisfies GetterTree<ConfigState, RootState>

0 commit comments

Comments
 (0)