fix: create memo with resource name

pull/2815/head
Steven 1 year ago
parent b2fc3076f6
commit 40bd75c725

@ -9,6 +9,7 @@ import (
"time"
"github.com/labstack/echo/v4"
"github.com/lithammer/shortuuid/v4"
"github.com/pkg/errors"
"go.uber.org/zap"
@ -894,6 +895,7 @@ func convertCreateMemoRequestToMemoMessage(memoCreate *CreateMemoRequest) *store
createdTs = *memoCreate.CreatedTs
}
return &store.Memo{
ResourceName: shortuuid.New(),
CreatorID: memoCreate.CreatorID,
CreatedTs: createdTs,
Content: memoCreate.Content,

@ -8,6 +8,7 @@ import (
"strconv"
"unicode/utf16"
"github.com/lithammer/shortuuid/v4"
"github.com/pkg/errors"
apiv1 "github.com/usememos/memos/api/v1"
@ -58,6 +59,7 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
}
create := &store.Memo{
ResourceName: shortuuid.New(),
CreatorID: creatorID,
Visibility: store.Private,
}

Loading…
Cancel
Save