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
b376a20f
Commit
b376a20f
authored
Aug 20, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak linter warnings
parent
2999f472
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
oauth2_test.go
plugin/idp/oauth2/oauth2_test.go
+1
-1
memo_service.go
server/router/api/v1/memo_service.go
+0
-1
server.go
server/server.go
+2
-2
No files found.
plugin/idp/oauth2/oauth2_test.go
View file @
b376a20f
...
...
@@ -98,7 +98,7 @@ func newMockServer(t *testing.T, code, accessToken string, userinfo []byte) *htt
})
require
.
NoError
(
t
,
err
)
})
mux
.
HandleFunc
(
"/oauth2/userinfo"
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
mux
.
HandleFunc
(
"/oauth2/userinfo"
,
func
(
w
http
.
ResponseWriter
,
_
*
http
.
Request
)
{
w
.
Header
()
.
Set
(
"Content-Type"
,
"application/json"
)
_
,
err
:=
w
.
Write
(
userinfo
)
require
.
NoError
(
t
,
err
)
...
...
server/router/api/v1/memo_service.go
View file @
b376a20f
...
...
@@ -60,7 +60,6 @@ func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoR
}
if
len
(
create
.
Content
)
>
contentLengthLimit
{
return
nil
,
status
.
Errorf
(
codes
.
InvalidArgument
,
"content too long (max %d characters)"
,
contentLengthLimit
)
}
property
,
err
:=
memoproperty
.
GetMemoPropertyFromContent
(
create
.
Content
)
if
err
!=
nil
{
...
...
server/server.go
View file @
b376a20f
...
...
@@ -9,7 +9,7 @@ import (
"time"
"github.com/google/uuid"
grpc
_
recovery
"github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpcrecovery
"github.com/grpc-ecosystem/go-grpc-middleware/recovery"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/pkg/errors"
...
...
@@ -78,7 +78,7 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
grpc
.
MaxRecvMsgSize
(
100
*
1024
*
1024
),
grpc
.
ChainUnaryInterceptor
(
apiv1
.
NewLoggerInterceptor
()
.
LoggerInterceptor
,
grpc
_
recovery
.
UnaryServerInterceptor
(),
grpcrecovery
.
UnaryServerInterceptor
(),
apiv1
.
NewGRPCAuthInterceptor
(
store
,
secret
)
.
AuthenticationInterceptor
,
))
s
.
grpcServer
=
grpcServer
...
...
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