From ed1ff11e80ab0f63998fa8cb6d597528ace7d694 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 13 Oct 2023 00:13:13 +0800 Subject: [PATCH] chore: update --- api/v2/user_service.go | 4 ++-- proto/store/activity.proto | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 proto/store/activity.proto diff --git a/api/v2/user_service.go b/api/v2/user_service.go index ae1d9483..1e65af5b 100644 --- a/api/v2/user_service.go +++ b/api/v2/user_service.go @@ -162,8 +162,8 @@ func (s *UserService) ListUserAccessTokens(ctx context.Context, request *apiv2pb } // Sort by issued time in descending order. - slices.SortFunc(accessTokens, func(i, j *apiv2pb.UserAccessToken) bool { - return i.IssuedAt.Seconds > j.IssuedAt.Seconds + slices.SortFunc(accessTokens, func(i, j *apiv2pb.UserAccessToken) int { + return int(i.IssuedAt.Seconds - j.IssuedAt.Seconds) }) response := &apiv2pb.ListUserAccessTokensResponse{ AccessTokens: accessTokens, diff --git a/proto/store/activity.proto b/proto/store/activity.proto new file mode 100644 index 00000000..1e4ab177 --- /dev/null +++ b/proto/store/activity.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package memos.store; + +option go_package = "gen/store"; + +message ActivityMemoCommentCreatePayload { + int32 memo_id = 1; + int32 user_id = 2; + int32 +}