mirror of
https://github.com/documize/community.git
synced 2025-07-19 05:09:42 +02:00
Support custom URLS for Diagrams.net
This commit is contained in:
parent
607a2d5797
commit
1a909dd046
8 changed files with 40 additions and 9 deletions
|
@ -217,7 +217,11 @@ func (h *Handler) GetInstanceSetting(w http.ResponseWriter, r *http.Request) {
|
|||
key := request.Query(r, "key")
|
||||
setting, _ := h.Store.Setting.GetUser(orgID, "", key, "")
|
||||
if len(setting) == 0 {
|
||||
setting = "{}"
|
||||
if key == "flowchart" {
|
||||
setting = fmt.Sprintf(`{ "url": "%s" }`, "https://embed.diagrams.net/?embed=1&ui=Kennedy&spin=0&proto=json&splash=0")
|
||||
} else {
|
||||
setting = "{}"
|
||||
}
|
||||
}
|
||||
|
||||
response.WriteJSON(w, setting)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue