Просмотр исходного кода

enhance: short url use "/p/short-id" instead of "/s/short-id"

Tienson Qin 3 недель назад
Родитель
Сommit
12f967437f

+ 1 - 1
deps/publish/src/logseq/publish/meta_store.cljs

@@ -91,7 +91,7 @@
            "graph" (get data "graph_uuid")
            "page_tags" page-tags
            "short_id" short-id
-           "short_url" (when short-id (str "/s/" short-id))
+           "short_url" (when short-id (str "/p/" short-id))
            "content_hash" (get data "content_hash")
            "content_length" (get data "content_length"))))
 

+ 2 - 2
deps/publish/src/logseq/publish/routes.cljs

@@ -136,7 +136,7 @@
                                                                                    :graph_uuid graph-uuid
                                                                                    :r2_key r2-key
                                                                                    :short_id short-id
-                                                                                   :short_url (str "/s/" short-id)
+                                                                                   :short_url (str "/p/" short-id)
                                                                                    :updated_at (.now js/Date)})))))))))))
 
 (defn handle-tag-page-html [graph-uuid tag-uuid env]
@@ -632,7 +632,7 @@
                             (js/Response. (.-body object)
                                           #js {:headers headers}))))))))
 
-      (and (string/starts-with? path "/s/") (= method "GET"))
+      (and (string/starts-with? path "/p/") (= method "GET"))
       (let [parts (string/split path #"/")
             short-id (nth parts 2 nil)]
         (if (string/blank? short-id)