mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
preparing article block endpoints
This commit is contained in:
parent
3af0122d64
commit
b079f32e7d
@ -1543,11 +1543,11 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
|
||||||
/content/articleBlocks/view:
|
/content/articleBlocks:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- content
|
- content
|
||||||
description: Get article block views. Acess granted to account token or contact token. When the request is made with a contact token the account view revision will be added to the block revision.
|
description: Get article blocks that should be updated based on revisions. Acess granted to account token or contact token. When the request is made with a contact token the account view revision will be added to the block revision.
|
||||||
operationId: get-article-block-view
|
operationId: get-article-block-view
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
|
@ -58,11 +58,6 @@ func GetArticleAssets(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetArticleBlockView(w http.ResponseWriter, r *http.Request) {
|
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
|
||||||
w.WriteHeader(http.StatusOK)
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetArticleSubjectField(w http.ResponseWriter, r *http.Request) {
|
func GetArticleSubjectField(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
|
11
net/server/internal/api_getArticleBlocks.go
Normal file
11
net/server/internal/api_getArticleBlocks.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package databag
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetArticleBlocks(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
}
|
||||||
|
|
@ -109,7 +109,7 @@ func SetProfileNotification(account *store.Account) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// notify all cards of content change
|
// notify all cards of content change
|
||||||
// account.Content incremented by adding, updating, removing article
|
// account.Content incremented by adding, updating, removing article & setting or clearning group or label from article
|
||||||
func SetContentNotification(account *store.Account) {
|
func SetContentNotification(account *store.Account) {
|
||||||
|
|
||||||
// select all connected cards
|
// select all connected cards
|
||||||
@ -165,7 +165,7 @@ func SetContactContentNotification(account *store.Account, card *store.Card) {
|
|||||||
|
|
||||||
|
|
||||||
// notify all cards of view change
|
// notify all cards of view change
|
||||||
// account.View incremented by removing a group or label or adding or removing a group with label
|
// account.View incremented by removing a group or label or adding or removing a group from a label
|
||||||
func SetViewNotification(account *store.Account) {
|
func SetViewNotification(account *store.Account) {
|
||||||
|
|
||||||
// select all connected cards
|
// select all connected cards
|
||||||
|
@ -482,10 +482,10 @@ var routes = Routes{
|
|||||||
},
|
},
|
||||||
|
|
||||||
Route{
|
Route{
|
||||||
"GetArticleBlockView",
|
"GetArticleBlocks",
|
||||||
strings.ToUpper("Get"),
|
strings.ToUpper("Get"),
|
||||||
"/content/articleBlocks/view",
|
"/content/articleBlocks",
|
||||||
GetArticleBlockView,
|
GetArticleBlocks,
|
||||||
},
|
},
|
||||||
|
|
||||||
Route{
|
Route{
|
||||||
|
Loading…
Reference in New Issue
Block a user