preparing article block endpoints

This commit is contained in:
Roland Osborne 2022-01-28 15:05:30 -08:00
parent 3af0122d64
commit b079f32e7d
5 changed files with 18 additions and 12 deletions

View File

@ -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: []

View File

@ -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)

View 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)
}

View File

@ -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

View File

@ -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{