Commit edc3f1d9 authored by Steven's avatar Steven

chore: retire unused memo view

parent 14745834
......@@ -203,16 +203,6 @@ message CreateMemoRequest {
optional Location location = 5;
}
enum MemoView {
MEMO_VIEW_UNSPECIFIED = 0;
// The full view of the memo. Includes all fields.
MEMO_VIEW_FULL = 1;
// The metadata only view of the memo. Excludes the content/snippet fields.
MEMO_VIEW_METADATA_ONLY = 2;
}
message ListMemosRequest {
// The maximum number of memos to return.
int32 page_size = 1;
......@@ -224,9 +214,6 @@ message ListMemosRequest {
// Filter is used to filter memos returned in the list.
// Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']"
string filter = 3;
// The view of the memo.
MemoView view = 4;
}
message ListMemosResponse {
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/activity_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/auth_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/common.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/idp_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/inbox_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/markdown_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/memo_relation_service.proto
......
This diff is collapsed.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/reaction_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/resource_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/user_service.proto
......@@ -693,9 +693,6 @@ func (x *UserStats) GetTagCount() map[string]int32 {
type ListAllUserStatsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Filter is used to filter memos to calculate stats.
// Same as `ListMemosRequest.filter`.
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
......@@ -730,13 +727,6 @@ func (*ListAllUserStatsRequest) Descriptor() ([]byte, []int) {
return file_api_v1_user_service_proto_rawDescGZIP(), []int{11}
}
func (x *ListAllUserStatsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
type ListAllUserStatsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserStats []*UserStats `protobuf:"bytes,1,rep,name=user_stats,json=userStats,proto3" json:"user_stats,omitempty"`
......@@ -786,9 +776,6 @@ type GetUserStatsRequest struct {
// The name of the user.
// Format: users/{user}.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Filter is used to filter memos to calculate stats.
// Same as `ListMemosRequest.filter`.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
......@@ -830,13 +817,6 @@ func (x *GetUserStatsRequest) GetName() string {
return ""
}
func (x *GetUserStatsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
type UserSetting struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the user.
......@@ -1465,19 +1445,16 @@ var file_api_v1_user_service_proto_rawDesc = []byte{
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x64,
0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x6e, 0x64, 0x6f, 0x5f, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x6e, 0x64, 0x6f,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x31, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c,
0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61,
0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74,
0x73, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x13,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22,
0x22, 0x52, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53,
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x53,
0x74, 0x61, 0x74, 0x73, 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53,
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
0x82, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20,
......
......@@ -309,19 +309,11 @@ func local_request_UserService_DeleteUser_0(ctx context.Context, marshaler runti
return msg, metadata, err
}
var filter_UserService_ListAllUserStats_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
func request_UserService_ListAllUserStats_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq ListAllUserStatsRequest
metadata runtime.ServerMetadata
)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListAllUserStats_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListAllUserStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
......@@ -331,18 +323,10 @@ func local_request_UserService_ListAllUserStats_0(ctx context.Context, marshaler
protoReq ListAllUserStatsRequest
metadata runtime.ServerMetadata
)
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListAllUserStats_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListAllUserStats(ctx, &protoReq)
return msg, metadata, err
}
var filter_UserService_GetUserStats_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
func request_UserService_GetUserStats_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq GetUserStatsRequest
......@@ -357,12 +341,6 @@ func request_UserService_GetUserStats_0(ctx context.Context, marshaler runtime.M
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserStats_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetUserStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
......@@ -381,12 +359,6 @@ func local_request_UserService_GetUserStats_0(ctx context.Context, marshaler run
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserStats_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetUserStats(ctx, &protoReq)
return msg, metadata, err
}
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/webhook_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/workspace_service.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: api/v1/workspace_setting_service.proto
......
......@@ -324,20 +324,6 @@ paths:
in: query
required: false
type: string
- name: view
description: |-
The view of the memo.
- MEMO_VIEW_FULL: The full view of the memo. Includes all fields.
- MEMO_VIEW_METADATA_ONLY: The metadata only view of the memo. Excludes the content/snippet fields.
in: query
required: false
type: string
enum:
- MEMO_VIEW_UNSPECIFIED
- MEMO_VIEW_FULL
- MEMO_VIEW_METADATA_ONLY
default: MEMO_VIEW_UNSPECIFIED
tags:
- MemoService
post:
......@@ -507,14 +493,6 @@ paths:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: filter
description: |-
Filter is used to filter memos to calculate stats.
Same as `ListMemosRequest.filter`.
in: query
required: false
type: string
tags:
- UserService
/api/v1/users:search:
......@@ -1509,13 +1487,6 @@ paths:
required: true
type: string
pattern: users/[^/]+
- name: filter
description: |-
Filter is used to filter memos to calculate stats.
Same as `ListMemosRequest.filter`.
in: query
required: false
type: string
tags:
- UserService
/api/v1/{parent}/tags/{tag}:
......@@ -2785,16 +2756,6 @@ definitions:
- REFERENCE
- COMMENT
default: TYPE_UNSPECIFIED
v1MemoView:
type: string
enum:
- MEMO_VIEW_UNSPECIFIED
- MEMO_VIEW_FULL
- MEMO_VIEW_METADATA_ONLY
default: MEMO_VIEW_UNSPECIFIED
description: |2-
- MEMO_VIEW_FULL: The full view of the memo. Includes all fields.
- MEMO_VIEW_METADATA_ONLY: The metadata only view of the memo. Excludes the content/snippet fields.
v1Node:
type: object
properties:
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/activity.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/idp.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/inbox.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/memo.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/resource.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/user_setting.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc-gen-go v1.36.3
// protoc (unknown)
// source: store/workspace_setting.proto
......
......@@ -82,7 +82,7 @@ func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoR
}
}
memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_FULL)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......@@ -120,9 +120,6 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq
limitPlusOne := limit + 1
memoFind.Limit = &limitPlusOne
memoFind.Offset = &offset
if request.View == v1pb.MemoView_MEMO_VIEW_METADATA_ONLY {
memoFind.ExcludeContent = true
}
memos, err := s.Store.ListMemos(ctx, memoFind)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to list memos: %v", err)
......@@ -138,7 +135,7 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq
}
}
for _, memo := range memos {
memoMessage, err := s.convertMemoFromStore(ctx, memo, request.View)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......@@ -179,7 +176,7 @@ func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest
}
}
memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_FULL)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......@@ -210,7 +207,7 @@ func (s *APIV1Service) GetMemoByUid(ctx context.Context, request *v1pb.GetMemoBy
}
}
memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_FULL)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......@@ -335,7 +332,7 @@ func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoR
if err != nil {
return nil, errors.Wrap(err, "failed to get memo")
}
memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_FULL)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......@@ -371,7 +368,7 @@ func (s *APIV1Service) DeleteMemo(ctx context.Context, request *v1pb.DeleteMemoR
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
}
if memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_METADATA_ONLY); err == nil {
if memoMessage, err := s.convertMemoFromStore(ctx, memo); err == nil {
// Try to dispatch webhook when memo is deleted.
if err := s.DispatchMemoDeletedWebhook(ctx, memoMessage); err != nil {
slog.Warn("Failed to dispatch memo deleted webhook", slog.Any("err", err))
......@@ -506,7 +503,7 @@ func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListM
return nil, status.Errorf(codes.Internal, "failed to get memo")
}
if memo != nil {
memoMessage, err := s.convertMemoFromStore(ctx, memo, v1pb.MemoView_MEMO_VIEW_FULL)
memoMessage, err := s.convertMemoFromStore(ctx, memo)
if err != nil {
return nil, errors.Wrap(err, "failed to convert memo")
}
......
......@@ -16,7 +16,7 @@ import (
"github.com/usememos/memos/store"
)
func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Memo, view v1pb.MemoView) (*v1pb.Memo, error) {
func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Memo) (*v1pb.Memo, error) {
displayTs := memo.CreatedTs
workspaceMemoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx)
if err != nil {
......@@ -49,8 +49,6 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
memoMessage.Parent = &parent
}
// Fill content when view is MEMO_VIEW_FULL.
if view == v1pb.MemoView_MEMO_VIEW_FULL {
listMemoRelationsResponse, err := s.ListMemoRelations(ctx, &v1pb.ListMemoRelationsRequest{Name: name})
if err != nil {
return nil, errors.Wrap(err, "failed to list memo relations")
......@@ -80,7 +78,6 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
return nil, errors.Wrap(err, "failed to get memo content snippet")
}
memoMessage.Snippet = snippet
}
return memoMessage, nil
}
......
......@@ -10,7 +10,7 @@ import { memoServiceClient } from "@/grpcweb";
import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts";
import useCurrentUser from "@/hooks/useCurrentUser";
import { MemoRelation_Memo, MemoRelation_Type } from "@/types/proto/api/v1/memo_relation_service";
import { Memo, MemoView } from "@/types/proto/api/v1/memo_service";
import { Memo } from "@/types/proto/api/v1/memo_service";
import { useTranslate } from "@/utils/i18n";
import { EditorRefActions } from "../Editor";
import { MemoEditorContext } from "../types";
......@@ -51,7 +51,6 @@ const AddMemoRelationPopover = (props: Props) => {
const { memos } = await memoServiceClient.listMemos({
pageSize: DEFAULT_LIST_MEMOS_PAGE_SIZE,
filter: filters.length > 0 ? filters.join(" && ") : undefined,
view: MemoView.MEMO_VIEW_FULL,
});
setFetchedMemos(memos);
} catch (error: any) {
......
......@@ -2,7 +2,7 @@ import { uniqueId } from "lodash-es";
import { create } from "zustand";
import { combine } from "zustand/middleware";
import { memoServiceClient } from "@/grpcweb";
import { CreateMemoRequest, ListMemosRequest, Memo, MemoView } from "@/types/proto/api/v1/memo_service";
import { CreateMemoRequest, ListMemosRequest, Memo } from "@/types/proto/api/v1/memo_service";
interface State {
// stateId is used to identify the store instance state.
......@@ -36,7 +36,6 @@ export const useMemoStore = create(
const { memos, nextPageToken } = await memoServiceClient.listMemos(
{
...request,
view: MemoView.MEMO_VIEW_FULL,
},
{ signal: controller.signal },
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment