Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
8b7e9f54
Commit
8b7e9f54
authored
Jan 10, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove unused user id
parent
30810156
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
81 additions
and
89 deletions
+81
-89
inbox_service.proto
proto/api/v1/inbox_service.proto
+3
-3
memo_service.proto
proto/api/v1/memo_service.proto
+2
-2
reaction_service.proto
proto/api/v1/reaction_service.proto
+1
-1
user_service.proto
proto/api/v1/user_service.proto
+9
-12
workspace_service.proto
proto/api/v1/workspace_service.proto
+1
-1
inbox_service.pb.go
proto/gen/api/v1/inbox_service.pb.go
+3
-3
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+2
-2
reaction_service.pb.go
proto/gen/api/v1/reaction_service.pb.go
+1
-1
user_service.pb.go
proto/gen/api/v1/user_service.pb.go
+12
-22
workspace_service.pb.go
proto/gen/api/v1/workspace_service.pb.go
+1
-1
apidocs.swagger.yaml
proto/gen/apidocs.swagger.yaml
+22
-30
user_service.go
server/router/api/v1/user_service.go
+0
-1
memo_filter.go
store/memo_filter.go
+13
-0
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+4
-8
WebhookSection.tsx
web/src/components/Settings/WebhookSection.tsx
+3
-2
resourceName.ts
web/src/store/v1/resourceName.ts
+4
-0
No files found.
proto/api/v1/inbox_service.proto
View file @
8b7e9f54
...
@@ -34,9 +34,9 @@ message Inbox {
...
@@ -34,9 +34,9 @@ message Inbox {
// The name of the inbox.
// The name of the inbox.
// Format: inboxes/{id}
// Format: inboxes/{id}
string
name
=
1
;
string
name
=
1
;
// Format: users/{
id
}
// Format: users/{
user
}
string
sender
=
2
;
string
sender
=
2
;
// Format: users/{
id
}
// Format: users/{
user
}
string
receiver
=
3
;
string
receiver
=
3
;
enum
Status
{
enum
Status
{
...
@@ -59,7 +59,7 @@ message Inbox {
...
@@ -59,7 +59,7 @@ message Inbox {
}
}
message
ListInboxesRequest
{
message
ListInboxesRequest
{
// Format: users/{
id
}
// Format: users/{
user
}
string
user
=
1
;
string
user
=
1
;
// The maximum number of inbox to return.
// The maximum number of inbox to return.
...
...
proto/api/v1/memo_service.proto
View file @
8b7e9f54
...
@@ -140,7 +140,7 @@ message Memo {
...
@@ -140,7 +140,7 @@ message Memo {
State
state
=
3
;
State
state
=
3
;
// The name of the creator.
// The name of the creator.
// Format: users/{
id
}
// Format: users/{
user
}
string
creator
=
4
;
string
creator
=
4
;
google.protobuf.Timestamp
create_time
=
5
;
google.protobuf.Timestamp
create_time
=
5
;
...
@@ -222,7 +222,7 @@ message ListMemosRequest {
...
@@ -222,7 +222,7 @@ message ListMemosRequest {
string
page_token
=
2
;
string
page_token
=
2
;
// Filter is used to filter memos returned in the list.
// Filter is used to filter memos returned in the list.
// Format: "creator == 'users/{u
id
}' && visibilities == ['PUBLIC', 'PROTECTED']"
// Format: "creator == 'users/{u
ser
}' && visibilities == ['PUBLIC', 'PROTECTED']"
string
filter
=
3
;
string
filter
=
3
;
// The view of the memo.
// The view of the memo.
...
...
proto/api/v1/reaction_service.proto
View file @
8b7e9f54
...
@@ -8,7 +8,7 @@ message Reaction {
...
@@ -8,7 +8,7 @@ message Reaction {
int32
id
=
1
;
int32
id
=
1
;
// The name of the creator.
// The name of the creator.
// Format: users/{
id
}
// Format: users/{
user
}
string
creator
=
2
;
string
creator
=
2
;
string
content_id
=
3
;
string
content_id
=
3
;
...
...
proto/api/v1/user_service.proto
View file @
8b7e9f54
...
@@ -88,12 +88,9 @@ service UserService {
...
@@ -88,12 +88,9 @@ service UserService {
message
User
{
message
User
{
// The name of the user.
// The name of the user.
// Format: users/{
id}
// Format: users/{
user}. {user} is a system-generated auto-increment id.
string
name
=
1
;
string
name
=
1
;
// The system generated uid of the user.
int32
id
=
2
;
enum
Role
{
enum
Role
{
ROLE_UNSPECIFIED
=
0
;
ROLE_UNSPECIFIED
=
0
;
HOST
=
1
;
HOST
=
1
;
...
@@ -139,13 +136,13 @@ message SearchUsersResponse {
...
@@ -139,13 +136,13 @@ message SearchUsersResponse {
message
GetUserRequest
{
message
GetUserRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
}
}
message
GetUserAvatarBinaryRequest
{
message
GetUserAvatarBinaryRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
// The raw HTTP body is bound to this field.
// The raw HTTP body is bound to this field.
...
@@ -164,13 +161,13 @@ message UpdateUserRequest {
...
@@ -164,13 +161,13 @@ message UpdateUserRequest {
message
DeleteUserRequest
{
message
DeleteUserRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
}
}
message
UserSetting
{
message
UserSetting
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
// The preferred locale of the user.
// The preferred locale of the user.
string
locale
=
2
;
string
locale
=
2
;
...
@@ -182,7 +179,7 @@ message UserSetting {
...
@@ -182,7 +179,7 @@ message UserSetting {
message
GetUserSettingRequest
{
message
GetUserSettingRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
}
}
...
@@ -201,7 +198,7 @@ message UserAccessToken {
...
@@ -201,7 +198,7 @@ message UserAccessToken {
message
ListUserAccessTokensRequest
{
message
ListUserAccessTokensRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
}
}
...
@@ -211,7 +208,7 @@ message ListUserAccessTokensResponse {
...
@@ -211,7 +208,7 @@ message ListUserAccessTokensResponse {
message
CreateUserAccessTokenRequest
{
message
CreateUserAccessTokenRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
string
description
=
2
;
string
description
=
2
;
...
@@ -221,7 +218,7 @@ message CreateUserAccessTokenRequest {
...
@@ -221,7 +218,7 @@ message CreateUserAccessTokenRequest {
message
DeleteUserAccessTokenRequest
{
message
DeleteUserAccessTokenRequest
{
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
string
name
=
1
;
string
name
=
1
;
// access_token is the access token to delete.
// access_token is the access token to delete.
string
access_token
=
2
;
string
access_token
=
2
;
...
...
proto/api/v1/workspace_service.proto
View file @
8b7e9f54
...
@@ -15,7 +15,7 @@ service WorkspaceService {
...
@@ -15,7 +15,7 @@ service WorkspaceService {
message
WorkspaceProfile
{
message
WorkspaceProfile
{
// The name of instance owner.
// The name of instance owner.
// Format:
"users/{id}"
// Format:
users/{user}
string
owner
=
1
;
string
owner
=
1
;
// version is the current version of instance
// version is the current version of instance
string
version
=
2
;
string
version
=
2
;
...
...
proto/gen/api/v1/inbox_service.pb.go
View file @
8b7e9f54
...
@@ -127,9 +127,9 @@ type Inbox struct {
...
@@ -127,9 +127,9 @@ type Inbox struct {
// The name of the inbox.
// The name of the inbox.
// Format: inboxes/{id}
// Format: inboxes/{id}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Format: users/{
id
}
// Format: users/{
user
}
Sender
string
`protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
Sender
string
`protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
// Format: users/{
id
}
// Format: users/{
user
}
Receiver
string
`protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
Receiver
string
`protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
Status
Inbox_Status
`protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v1.Inbox_Status" json:"status,omitempty"`
Status
Inbox_Status
`protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v1.Inbox_Status" json:"status,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
...
@@ -220,7 +220,7 @@ func (x *Inbox) GetActivityId() int32 {
...
@@ -220,7 +220,7 @@ func (x *Inbox) GetActivityId() int32 {
type
ListInboxesRequest
struct
{
type
ListInboxesRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Format: users/{
id
}
// Format: users/{
user
}
User
string
`protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
User
string
`protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// The maximum number of inbox to return.
// The maximum number of inbox to return.
PageSize
int32
`protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
PageSize
int32
`protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
8b7e9f54
...
@@ -137,7 +137,7 @@ type Memo struct {
...
@@ -137,7 +137,7 @@ type Memo struct {
Uid
string
`protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
Uid
string
`protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
State
State
`protobuf:"varint,3,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
State
State
`protobuf:"varint,3,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
// The name of the creator.
// The name of the creator.
// Format: users/{
id
}
// Format: users/{
user
}
Creator
string
`protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
Creator
string
`protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
...
@@ -537,7 +537,7 @@ type ListMemosRequest struct {
...
@@ -537,7 +537,7 @@ type ListMemosRequest struct {
// Provide this to retrieve the subsequent page.
// Provide this to retrieve the subsequent page.
PageToken
string
`protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
PageToken
string
`protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Filter is used to filter memos returned in the list.
// Filter is used to filter memos returned in the list.
// Format: "creator == 'users/{u
id
}' && visibilities == ['PUBLIC', 'PROTECTED']"
// Format: "creator == 'users/{u
ser
}' && visibilities == ['PUBLIC', 'PROTECTED']"
Filter
string
`protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
Filter
string
`protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
// The view of the memo.
// The view of the memo.
View
MemoView
`protobuf:"varint,4,opt,name=view,proto3,enum=memos.api.v1.MemoView" json:"view,omitempty"`
View
MemoView
`protobuf:"varint,4,opt,name=view,proto3,enum=memos.api.v1.MemoView" json:"view,omitempty"`
...
...
proto/gen/api/v1/reaction_service.pb.go
View file @
8b7e9f54
...
@@ -24,7 +24,7 @@ type Reaction struct {
...
@@ -24,7 +24,7 @@ type Reaction struct {
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
Id
int32
`protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Id
int32
`protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The name of the creator.
// The name of the creator.
// Format: users/{
id
}
// Format: users/{
user
}
Creator
string
`protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
Creator
string
`protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
ContentId
string
`protobuf:"bytes,3,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
ContentId
string
`protobuf:"bytes,3,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
ReactionType
string
`protobuf:"bytes,4,opt,name=reaction_type,json=reactionType,proto3" json:"reaction_type,omitempty"`
ReactionType
string
`protobuf:"bytes,4,opt,name=reaction_type,json=reactionType,proto3" json:"reaction_type,omitempty"`
...
...
proto/gen/api/v1/user_service.pb.go
View file @
8b7e9f54
...
@@ -80,10 +80,8 @@ func (User_Role) EnumDescriptor() ([]byte, []int) {
...
@@ -80,10 +80,8 @@ func (User_Role) EnumDescriptor() ([]byte, []int) {
type
User
struct
{
type
User
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{id}
// Format: users/{user}. {user} is a system-generated auto-increment id.
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The system generated uid of the user.
Id
int32
`protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
Role
User_Role
`protobuf:"varint,3,opt,name=role,proto3,enum=memos.api.v1.User_Role" json:"role,omitempty"`
Role
User_Role
`protobuf:"varint,3,opt,name=role,proto3,enum=memos.api.v1.User_Role" json:"role,omitempty"`
Username
string
`protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
Username
string
`protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
Email
string
`protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
Email
string
`protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
...
@@ -135,13 +133,6 @@ func (x *User) GetName() string {
...
@@ -135,13 +133,6 @@ func (x *User) GetName() string {
return
""
return
""
}
}
func
(
x
*
User
)
GetId
()
int32
{
if
x
!=
nil
{
return
x
.
Id
}
return
0
}
func
(
x
*
User
)
GetRole
()
User_Role
{
func
(
x
*
User
)
GetRole
()
User_Role
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Role
return
x
.
Role
...
@@ -385,7 +376,7 @@ func (x *SearchUsersResponse) GetUsers() []*User {
...
@@ -385,7 +376,7 @@ func (x *SearchUsersResponse) GetUsers() []*User {
type
GetUserRequest
struct
{
type
GetUserRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -431,7 +422,7 @@ func (x *GetUserRequest) GetName() string {
...
@@ -431,7 +422,7 @@ func (x *GetUserRequest) GetName() string {
type
GetUserAvatarBinaryRequest
struct
{
type
GetUserAvatarBinaryRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The raw HTTP body is bound to this field.
// The raw HTTP body is bound to this field.
HttpBody
*
httpbody
.
HttpBody
`protobuf:"bytes,2,opt,name=http_body,json=httpBody,proto3" json:"http_body,omitempty"`
HttpBody
*
httpbody
.
HttpBody
`protobuf:"bytes,2,opt,name=http_body,json=httpBody,proto3" json:"http_body,omitempty"`
...
@@ -582,7 +573,7 @@ func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
...
@@ -582,7 +573,7 @@ func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
type
DeleteUserRequest
struct
{
type
DeleteUserRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -628,7 +619,7 @@ func (x *DeleteUserRequest) GetName() string {
...
@@ -628,7 +619,7 @@ func (x *DeleteUserRequest) GetName() string {
type
UserSetting
struct
{
type
UserSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The preferred locale of the user.
// The preferred locale of the user.
Locale
string
`protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"`
Locale
string
`protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"`
...
@@ -701,7 +692,7 @@ func (x *UserSetting) GetMemoVisibility() string {
...
@@ -701,7 +692,7 @@ func (x *UserSetting) GetMemoVisibility() string {
type
GetUserSettingRequest
struct
{
type
GetUserSettingRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -867,7 +858,7 @@ func (x *UserAccessToken) GetExpiresAt() *timestamppb.Timestamp {
...
@@ -867,7 +858,7 @@ func (x *UserAccessToken) GetExpiresAt() *timestamppb.Timestamp {
type
ListUserAccessTokensRequest
struct
{
type
ListUserAccessTokensRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -957,7 +948,7 @@ func (x *ListUserAccessTokensResponse) GetAccessTokens() []*UserAccessToken {
...
@@ -957,7 +948,7 @@ func (x *ListUserAccessTokensResponse) GetAccessTokens() []*UserAccessToken {
type
CreateUserAccessTokenRequest
struct
{
type
CreateUserAccessTokenRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description
string
`protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Description
string
`protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
ExpiresAt
*
timestamppb
.
Timestamp
`protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"`
ExpiresAt
*
timestamppb
.
Timestamp
`protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"`
...
@@ -1019,7 +1010,7 @@ func (x *CreateUserAccessTokenRequest) GetExpiresAt() *timestamppb.Timestamp {
...
@@ -1019,7 +1010,7 @@ func (x *CreateUserAccessTokenRequest) GetExpiresAt() *timestamppb.Timestamp {
type
DeleteUserAccessTokenRequest
struct
{
type
DeleteUserAccessTokenRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user.
// The name of the user.
// Format: users/{
id
}
// Format: users/{
user
}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// access_token is the access token to delete.
// access_token is the access token to delete.
AccessToken
string
`protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
AccessToken
string
`protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
...
@@ -1091,9 +1082,8 @@ var file_api_v1_user_service_proto_rawDesc = []byte{
...
@@ -1091,9 +1082,8 @@ var file_api_v1_user_service_proto_rawDesc = []byte{
0x66
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x66
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x5f
,
0x6d
,
0x61
,
0x73
,
0x6b
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x1a
,
0x1f
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x1a
,
0x1f
,
0x67
,
0x6f
,
0x6f
,
0x67
,
0x6c
,
0x65
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x62
,
0x75
,
0x66
,
0x2f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x66
,
0x2f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x73
,
0x74
,
0x61
,
0x6d
,
0x70
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x22
,
0xea
,
0x03
,
0x0a
,
0x04
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6f
,
0x22
,
0xda
,
0x03
,
0x0a
,
0x04
,
0x55
,
0x73
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x0e
,
0x6d
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x2b
,
0x0a
,
0x02
,
0x69
,
0x64
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x02
,
0x69
,
0x64
,
0x12
,
0x2b
,
0x0a
,
0x04
,
0x72
,
0x6f
,
0x6c
,
0x65
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x0e
,
0x32
,
0x17
,
0x2e
,
0x6d
,
0x0a
,
0x04
,
0x72
,
0x6f
,
0x6c
,
0x65
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x0e
,
0x32
,
0x17
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x55
,
0x73
,
0x65
,
0x72
,
0x2e
,
0x52
,
0x6f
,
0x6c
,
0x65
,
0x52
,
0x04
,
0x72
,
0x6f
,
0x6c
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x75
,
0x2e
,
0x52
,
0x6f
,
0x6c
,
0x65
,
0x52
,
0x04
,
0x72
,
0x6f
,
0x6c
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x75
,
...
...
proto/gen/api/v1/workspace_service.pb.go
View file @
8b7e9f54
...
@@ -24,7 +24,7 @@ const (
...
@@ -24,7 +24,7 @@ const (
type
WorkspaceProfile
struct
{
type
WorkspaceProfile
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of instance owner.
// The name of instance owner.
// Format:
"users/{id}"
// Format:
users/{user}
Owner
string
`protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
Owner
string
`protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
// version is the current version of instance
// version is the current version of instance
Version
string
`protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Version
string
`protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
...
...
proto/gen/apidocs.swagger.yaml
View file @
8b7e9f54
...
@@ -190,7 +190,7 @@ paths:
...
@@ -190,7 +190,7 @@ paths:
$ref
:
'
#/definitions/googlerpcStatus'
$ref
:
'
#/definitions/googlerpcStatus'
parameters
:
parameters
:
-
name
:
user
-
name
:
user
description
:
'
Format:
users/{
id
}'
description
:
'
Format:
users/{
user
}'
in
:
query
in
:
query
required
:
false
required
:
false
type
:
string
type
:
string
...
@@ -320,7 +320,7 @@ paths:
...
@@ -320,7 +320,7 @@ paths:
-
name
:
filter
-
name
:
filter
description
:
|-
description
:
|-
Filter is used to filter memos returned in the list.
Filter is used to filter memos returned in the list.
Format: "creator == 'users/{u
id
}' && visibilities == ['PUBLIC', 'PROTECTED']"
Format: "creator == 'users/{u
ser
}' && visibilities == ['PUBLIC', 'PROTECTED']"
in: query
in: query
required: false
required: false
type: string
type: string
...
@@ -787,10 +787,10 @@ paths:
...
@@ -787,10 +787,10 @@ paths:
properties
:
properties
:
sender
:
sender
:
type
:
string
type
:
string
title
:
'
Format:
users/{
id
}'
title
:
'
Format:
users/{
user
}'
receiver
:
receiver
:
type
:
string
type
:
string
title
:
'
Format:
users/{
id
}'
title
:
'
Format:
users/{
user
}'
status
:
status
:
$ref
:
'
#/definitions/v1InboxStatus'
$ref
:
'
#/definitions/v1InboxStatus'
createTime
:
createTime
:
...
@@ -841,7 +841,7 @@ paths:
...
@@ -841,7 +841,7 @@ paths:
type
:
string
type
:
string
title
:
|-
title
:
|-
The name of the creator.
The name of the creator.
Format: users/{
id
}
Format: users/{
user
}
createTime
:
createTime
:
type
:
string
type
:
string
format
:
date-time
format
:
date-time
...
@@ -919,7 +919,7 @@ paths:
...
@@ -919,7 +919,7 @@ paths:
-
name
:
name_1
-
name
:
name_1
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1137,7 +1137,7 @@ paths:
...
@@ -1137,7 +1137,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1161,7 +1161,7 @@ paths:
...
@@ -1161,7 +1161,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1184,7 +1184,7 @@ paths:
...
@@ -1184,7 +1184,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1214,7 +1214,7 @@ paths:
...
@@ -1214,7 +1214,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1453,7 +1453,7 @@ paths:
...
@@ -1453,7 +1453,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1595,7 +1595,7 @@ paths:
...
@@ -1595,7 +1595,7 @@ paths:
-
name
:
setting.name
-
name
:
setting.name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1636,7 +1636,7 @@ paths:
...
@@ -1636,7 +1636,7 @@ paths:
-
name
:
user.name
-
name
:
user.name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id}
Format: users/{
user}. {user} is a system-generated auto-increment id.
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1647,10 +1647,6 @@ paths:
...
@@ -1647,10 +1647,6 @@ paths:
schema
:
schema
:
type
:
object
type
:
object
properties
:
properties
:
id
:
type
:
integer
format
:
int32
description
:
The system generated uid of the user.
role
:
role
:
$ref
:
'
#/definitions/UserRole'
$ref
:
'
#/definitions/UserRole'
username
:
username
:
...
@@ -1694,7 +1690,7 @@ paths:
...
@@ -1694,7 +1690,7 @@ paths:
-
name
:
name
-
name
:
name
description
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
in: path
in: path
required: true
required: true
type: string
type: string
...
@@ -1975,7 +1971,7 @@ definitions:
...
@@ -1975,7 +1971,7 @@ definitions:
type
:
string
type
:
string
title
:
|-
title
:
|-
The name of the creator.
The name of the creator.
Format: users/{
id
}
Format: users/{
user
}
createTime
:
createTime
:
type
:
string
type
:
string
format
:
date-time
format
:
date-time
...
@@ -2060,7 +2056,7 @@ definitions:
...
@@ -2060,7 +2056,7 @@ definitions:
type
:
string
type
:
string
title
:
|-
title
:
|-
The name of the user.
The name of the user.
Format: users/{
id
}
Format: users/{
user
}
locale
:
locale
:
type
:
string
type
:
string
description
:
The preferred locale of the user.
description
:
The preferred locale of the user.
...
@@ -2486,10 +2482,10 @@ definitions:
...
@@ -2486,10 +2482,10 @@ definitions:
Format: inboxes/{id}
Format: inboxes/{id}
sender
:
sender
:
type
:
string
type
:
string
title
:
'
Format:
users/{
id
}'
title
:
'
Format:
users/{
user
}'
receiver
:
receiver
:
type
:
string
type
:
string
title
:
'
Format:
users/{
id
}'
title
:
'
Format:
users/{
user
}'
status
:
status
:
$ref
:
'
#/definitions/v1InboxStatus'
$ref
:
'
#/definitions/v1InboxStatus'
createTime
:
createTime
:
...
@@ -2869,7 +2865,7 @@ definitions:
...
@@ -2869,7 +2865,7 @@ definitions:
type
:
string
type
:
string
title
:
|-
title
:
|-
The name of the creator.
The name of the creator.
Format: users/{
id
}
Format: users/{
user
}
contentId
:
contentId
:
type
:
string
type
:
string
reactionType
:
reactionType
:
...
@@ -3035,13 +3031,9 @@ definitions:
...
@@ -3035,13 +3031,9 @@ definitions:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
title
:
|-
description
:
|-
The name of the user.
The name of the user.
Format: users/{id}
Format: users/{user}. {user} is a system-generated auto-increment id.
id
:
type
:
integer
format
:
int32
description
:
The system generated uid of the user.
role
:
role
:
$ref
:
'
#/definitions/UserRole'
$ref
:
'
#/definitions/UserRole'
username
:
username
:
...
@@ -3111,7 +3103,7 @@ definitions:
...
@@ -3111,7 +3103,7 @@ definitions:
type
:
string
type
:
string
title
:
|-
title
:
|-
The name of instance owner.
The name of instance owner.
Format:
"users/{id}"
Format:
users/{user}
version
:
version
:
type
:
string
type
:
string
title
:
version is the current version of instance
title
:
version is the current version of instance
...
...
server/router/api/v1/user_service.go
View file @
8b7e9f54
...
@@ -556,7 +556,6 @@ func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store
...
@@ -556,7 +556,6 @@ func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store
func
convertUserFromStore
(
user
*
store
.
User
)
*
v1pb
.
User
{
func
convertUserFromStore
(
user
*
store
.
User
)
*
v1pb
.
User
{
userpb
:=
&
v1pb
.
User
{
userpb
:=
&
v1pb
.
User
{
Name
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
user
.
ID
),
Name
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
user
.
ID
),
Id
:
user
.
ID
,
State
:
convertStateFromStore
(
user
.
RowStatus
),
State
:
convertStateFromStore
(
user
.
RowStatus
),
CreateTime
:
timestamppb
.
New
(
time
.
Unix
(
user
.
CreatedTs
,
0
)),
CreateTime
:
timestamppb
.
New
(
time
.
Unix
(
user
.
CreatedTs
,
0
)),
UpdateTime
:
timestamppb
.
New
(
time
.
Unix
(
user
.
UpdatedTs
,
0
)),
UpdateTime
:
timestamppb
.
New
(
time
.
Unix
(
user
.
UpdatedTs
,
0
)),
...
...
store/memo_filter.go
0 → 100644
View file @
8b7e9f54
package
store
type
LogicOperator
string
const
(
AND
LogicOperator
=
"AND"
OR
LogicOperator
=
"OR"
)
type
QueryExpression
struct
{
Operator
LogicOperator
Children
[]
*
QueryExpression
}
web/src/components/Settings/MemberSection.tsx
View file @
8b7e9f54
...
@@ -173,14 +173,11 @@ const MemberSection = () => {
...
@@ -173,14 +173,11 @@ const MemberSection = () => {
<
thead
>
<
thead
>
<
tr
className=
"text-sm font-semibold text-left text-gray-900 dark:text-gray-400"
>
<
tr
className=
"text-sm font-semibold text-left text-gray-900 dark:text-gray-400"
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
ID
{
t
(
"common.username"
)
}
</
th
>
</
th
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
{
t
(
"common.role"
)
}
{
t
(
"common.role"
)
}
</
th
>
</
th
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
{
t
(
"common.username"
)
}
</
th
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
<
th
scope=
"col"
className=
"px-3 py-2"
>
{
t
(
"common.nickname"
)
}
{
t
(
"common.nickname"
)
}
</
th
>
</
th
>
...
@@ -192,17 +189,16 @@ const MemberSection = () => {
...
@@ -192,17 +189,16 @@ const MemberSection = () => {
</
thead
>
</
thead
>
<
tbody
className=
"divide-y divide-gray-200 dark:divide-zinc-600"
>
<
tbody
className=
"divide-y divide-gray-200 dark:divide-zinc-600"
>
{
sortedUsers
.
map
((
user
)
=>
(
{
sortedUsers
.
map
((
user
)
=>
(
<
tr
key=
{
user
.
id
}
>
<
tr
key=
{
user
.
name
}
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-900 dark:text-gray-400"
>
{
user
.
id
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
stringifyUserRole
(
user
.
role
)
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
user
.
username
}
{
user
.
username
}
<
span
className=
"ml-1 italic"
>
{
user
.
state
===
State
.
ARCHIVED
&&
"(Archived)"
}
</
span
>
<
span
className=
"ml-1 italic"
>
{
user
.
state
===
State
.
ARCHIVED
&&
"(Archived)"
}
</
span
>
</
td
>
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
stringifyUserRole
(
user
.
role
)
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
user
.
nickname
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
user
.
nickname
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
user
.
email
}
</
td
>
<
td
className=
"whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"
>
{
user
.
email
}
</
td
>
<
td
className=
"relative whitespace-nowrap py-2 pl-3 pr-4 text-right text-sm font-medium flex justify-end"
>
<
td
className=
"relative whitespace-nowrap py-2 pl-3 pr-4 text-right text-sm font-medium flex justify-end"
>
{
currentUser
?.
id
===
user
.
id
?
(
{
currentUser
?.
name
===
user
.
name
?
(
<
span
>
{
t
(
"common.yourself"
)
}
</
span
>
<
span
>
{
t
(
"common.yourself"
)
}
</
span
>
)
:
(
)
:
(
<
Dropdown
>
<
Dropdown
>
...
...
web/src/components/Settings/WebhookSection.tsx
View file @
8b7e9f54
...
@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
...
@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
import
{
Link
}
from
"react-router-dom"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
webhookServiceClient
}
from
"@/grpcweb"
;
import
{
webhookServiceClient
}
from
"@/grpcweb"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
{
extractUserIdFromName
}
from
"@/store/v1"
;
import
{
Webhook
}
from
"@/types/proto/api/v1/webhook_service"
;
import
{
Webhook
}
from
"@/types/proto/api/v1/webhook_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
showCreateWebhookDialog
from
"../CreateWebhookDialog"
;
import
showCreateWebhookDialog
from
"../CreateWebhookDialog"
;
...
@@ -21,13 +22,13 @@ const WebhookSection = () => {
...
@@ -21,13 +22,13 @@ const WebhookSection = () => {
const
[
webhooks
,
setWebhooks
]
=
useState
<
Webhook
[]
>
([]);
const
[
webhooks
,
setWebhooks
]
=
useState
<
Webhook
[]
>
([]);
useEffect
(()
=>
{
useEffect
(()
=>
{
listWebhooks
(
currentUser
.
id
).
then
((
webhooks
)
=>
{
listWebhooks
(
extractUserIdFromName
(
currentUser
.
name
)
).
then
((
webhooks
)
=>
{
setWebhooks
(
webhooks
);
setWebhooks
(
webhooks
);
});
});
},
[]);
},
[]);
const
handleCreateAccessTokenDialogConfirm
=
async
()
=>
{
const
handleCreateAccessTokenDialogConfirm
=
async
()
=>
{
const
webhooks
=
await
listWebhooks
(
currentUser
.
id
);
const
webhooks
=
await
listWebhooks
(
extractUserIdFromName
(
currentUser
.
name
)
);
setWebhooks
(
webhooks
);
setWebhooks
(
webhooks
);
};
};
...
...
web/src/store/v1/resourceName.ts
View file @
8b7e9f54
...
@@ -4,6 +4,10 @@ export const memoNamePrefix = "memos/";
...
@@ -4,6 +4,10 @@ export const memoNamePrefix = "memos/";
export
const
identityProviderNamePrefix
=
"identityProviders/"
;
export
const
identityProviderNamePrefix
=
"identityProviders/"
;
export
const
activityNamePrefix
=
"activities/"
;
export
const
activityNamePrefix
=
"activities/"
;
export
const
extractUserIdFromName
=
(
name
:
string
)
=>
{
return
parseInt
(
name
.
split
(
userNamePrefix
).
pop
()
||
""
,
10
);
};
export
const
extractMemoIdFromName
=
(
name
:
string
)
=>
{
export
const
extractMemoIdFromName
=
(
name
:
string
)
=>
{
return
parseInt
(
name
.
split
(
memoNamePrefix
).
pop
()
||
""
,
10
);
return
parseInt
(
name
.
split
(
memoNamePrefix
).
pop
()
||
""
,
10
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment