feat: add reaction token

This commit is contained in:
tim
2025-07-09 18:22:31 +08:00
parent d7c3e3e8ea
commit ccd0c817f6
2 changed files with 5 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ export default {
width: 32px;
height: 32px;
border-radius: 50%;
color: white;
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;

View File

@@ -33,7 +33,10 @@ let cachedTypes = null
const fetchTypes = async () => {
if (cachedTypes) return cachedTypes
try {
const res = await fetch(`${API_BASE_URL}/api/reaction-types`)
const token = getToken()
const res = await fetch(`${API_BASE_URL}/api/reaction-types`, {
headers: { Authorization: `Bearer ${token}` }
})
if (res.ok) {
cachedTypes = await res.json()
} else {