mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 22:34:25 +01:00
Support embedding profiles in external web pages
prifile design SQUASH
This commit is contained in:
@@ -59,13 +59,6 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// render npub and nprofile using a separate function
|
||||
if prefix == "npub" || prefix == "nprofile" {
|
||||
// it's a profile
|
||||
renderProfile(w, r, code)
|
||||
return
|
||||
}
|
||||
|
||||
// Check if the embed parameter is set to "yes"
|
||||
embedParam := r.URL.Query().Get("embed")
|
||||
if embedParam == "yes" {
|
||||
@@ -73,6 +66,13 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// render npub and nprofile using a separate function
|
||||
if prefix == "npub" || prefix == "nprofile" {
|
||||
// it's a profile
|
||||
renderProfile(w, r, code)
|
||||
return
|
||||
}
|
||||
|
||||
// get data for this event
|
||||
data, err := grabData(r.Context(), code, false)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user