浏览代码

fix: correct API endpoint path and adjust post width config

Adam Jafarov 1 周之前
父节点
当前提交
bade278c10
共有 4 个文件被更改,包括 5 次插入12 次删除
  1. 1 1
      backend/config.json
  2. 1 1
      src/components/AdminDashboard.jsx
  3. 0 9
      src/components/Layout.jsx
  4. 3 1
      src/components/PostView.jsx

+ 1 - 1
backend/config.json

@@ -1,4 +1,4 @@
 {
   "activeTheme": "dark",
-  "postWidth": "max-w-6xl"
+  "postWidth": "max-w-5xl"
 }

+ 1 - 1
src/components/AdminDashboard.jsx

@@ -29,7 +29,7 @@ function ChangePasswordForm() {
 
         try {
             setLoading(true);
-            const response = await fetch(`${API_BASE}/api/auth/change-password`, {
+            const response = await fetch(`${API_BASE}/auth/change-password`, {
                 method: "POST",
                 headers: { "Content-Type": "application/json" },
                 body: JSON.stringify({ currentPassword, newPassword }),

+ 0 - 9
src/components/Layout.jsx

@@ -50,15 +50,6 @@ export function NavHeader() {
                                 Logout
                             </button>
                         </li>
-                    ) : (
-                        <li>
-                            <Link
-                                to="/login"
-                                className="theme-primary hover:theme-secondary transition-colors duration-200 font-medium"
-                            >
-                                Login
-                            </Link>
-                        </li>
                     )}
                 </ul>
             </nav>

+ 3 - 1
src/components/PostView.jsx

@@ -314,7 +314,9 @@ function PostView({ onImageClick }) {
         }
         processedText = processedText
             .replace(/^title:.*$/m, "")
-            .replace(/^desc:.*$/m, "");
+            .replace(/^desc:.*$/m, "")
+            .replace(/^pinned:.*$/m, "")
+            .replace(/^hidden:.*$/m, "");
         return {
             processedText,
             tags,