Remote auth for prompt templates

This commit is contained in:
icy
2025-11-01 20:25:55 +08:00
parent 1fdf227f38
commit 40152c6a2a
2 changed files with 5 additions and 9 deletions

View File

@@ -120,12 +120,7 @@ export function TraderConfigModal({
useEffect(() => {
const fetchPromptTemplates = async () => {
try {
const token = localStorage.getItem('token');
const response = await fetch('/api/prompt-templates', {
headers: {
'Authorization': `Bearer ${token}`
}
});
const response = await fetch('/api/prompt-templates');
const data = await response.json();
if (data.templates) {
setPromptTemplates(data.templates);