Commit 76c93635 authored by Steven's avatar Steven

chore: fix resource link

parent 6db427e3
package v2 package v2
import "strings"
var authenticationAllowlistMethods = map[string]bool{ var authenticationAllowlistMethods = map[string]bool{
"/memos.api.v2.WorkspaceService/GetWorkspaceProfile": true, "/memos.api.v2.WorkspaceService/GetWorkspaceProfile": true,
"/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting": true, "/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting": true,
...@@ -23,9 +21,6 @@ var authenticationAllowlistMethods = map[string]bool{ ...@@ -23,9 +21,6 @@ var authenticationAllowlistMethods = map[string]bool{
// isUnauthorizeAllowedMethod returns whether the method is exempted from authentication. // isUnauthorizeAllowedMethod returns whether the method is exempted from authentication.
func isUnauthorizeAllowedMethod(fullMethodName string) bool { func isUnauthorizeAllowedMethod(fullMethodName string) bool {
if strings.HasPrefix(fullMethodName, "/grpc.reflection") {
return true
}
return authenticationAllowlistMethods[fullMethodName] return authenticationAllowlistMethods[fullMethodName]
} }
......
...@@ -132,8 +132,7 @@ const Resources = () => { ...@@ -132,8 +132,7 @@ const Resources = () => {
{relatedMemo && ( {relatedMemo && (
<Link <Link
className="shrink-0 text-xs ml-1 text-gray-400 hover:underline hover:text-blue-600" className="shrink-0 text-xs ml-1 text-gray-400 hover:underline hover:text-blue-600"
to={`/m/${relatedMemo.name}`} to={`/m/${relatedMemo.resourceId}`}
target="_blank"
> >
#{extractMemoIdFromName(relatedMemo.name)} #{extractMemoIdFromName(relatedMemo.name)}
</Link> </Link>
......
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