mirror of
https://github.com/usememos/memos.git
synced 2025-01-01 18:11:49 +08:00
chore: update metrics
This commit is contained in:
parent
982b0285c9
commit
137e64b0dd
2 changed files with 3 additions and 0 deletions
|
@ -360,6 +360,7 @@ func (s *APIV1Service) CreateMemo(c echo.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create activity").SetInternal(err)
|
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create activity").SetInternal(err)
|
||||||
}
|
}
|
||||||
|
metric.Enqueue("memo comment create")
|
||||||
if _, err := s.Store.CreateInbox(ctx, &store.Inbox{
|
if _, err := s.Store.CreateInbox(ctx, &store.Inbox{
|
||||||
SenderID: memo.CreatorID,
|
SenderID: memo.CreatorID,
|
||||||
ReceiverID: relatedMemo.CreatorID,
|
ReceiverID: relatedMemo.CreatorID,
|
||||||
|
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"github.com/usememos/memos/internal/log"
|
"github.com/usememos/memos/internal/log"
|
||||||
"github.com/usememos/memos/internal/util"
|
"github.com/usememos/memos/internal/util"
|
||||||
"github.com/usememos/memos/plugin/storage/s3"
|
"github.com/usememos/memos/plugin/storage/s3"
|
||||||
|
"github.com/usememos/memos/server/service/metric"
|
||||||
"github.com/usememos/memos/store"
|
"github.com/usememos/memos/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -158,6 +159,7 @@ func (s *APIV1Service) CreateResource(c echo.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create resource").SetInternal(err)
|
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create resource").SetInternal(err)
|
||||||
}
|
}
|
||||||
|
metric.Enqueue("resource create")
|
||||||
return c.JSON(http.StatusOK, convertResourceFromStore(resource))
|
return c.JSON(http.StatusOK, convertResourceFromStore(resource))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue