mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 12:23:12 +00:00
chore: update frontend buf generator
This commit is contained in:
parent
29043f63b6
commit
7c16b1e00f
@ -113,7 +113,7 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
|
||||
const handleVisibilityInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setPartialState({
|
||||
collectionCreate: Object.assign(state.collectionCreate, {
|
||||
visibility: Number(e.target.value),
|
||||
visibility: e.target.value,
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
@ -128,7 +128,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
const handleVisibilityInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setPartialState({
|
||||
shortcutCreate: Object.assign(state.shortcutCreate, {
|
||||
visibility: Number(e.target.value),
|
||||
visibility: e.target.value,
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ const useUserStore = create<UserState>()((set, get) => ({
|
||||
}
|
||||
|
||||
const { user } = await userServiceClient.getUser({
|
||||
id: Number(id),
|
||||
id: id,
|
||||
});
|
||||
if (!user) {
|
||||
throw new Error("User not found");
|
||||
|
@ -24,20 +24,24 @@ plugins:
|
||||
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
|
||||
opt:
|
||||
- env=browser
|
||||
- useOptionals=messages
|
||||
- outputServices=generic-definitions
|
||||
- outputJsonMethods=false
|
||||
- useExactTypes=false
|
||||
- esModuleInterop=true
|
||||
- stringEnums=true
|
||||
# Generate types for the extension client.
|
||||
- plugin: buf.build/community/stephenh-ts-proto:v1.152.1
|
||||
out: ../frontend/extension/src/types/proto
|
||||
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
|
||||
opt:
|
||||
- env=browser
|
||||
- useOptionals=messages
|
||||
- outputServices=generic-definitions
|
||||
- outputJsonMethods=false
|
||||
- useExactTypes=false
|
||||
- esModuleInterop=true
|
||||
- stringEnums=true
|
||||
- plugin: buf.build/community/pseudomuto-doc:v1.5.1
|
||||
out: gen
|
||||
opt:
|
||||
|
@ -8,7 +8,7 @@ var allowedMethodsWhenUnauthorized = map[string]bool{
|
||||
"/slash.api.v1.AuthService/SignIn": true,
|
||||
"/slash.api.v1.AuthService/SignUp": true,
|
||||
"/slash.api.v1.AuthService/SignOut": true,
|
||||
"/memos.api.v1.AuthService/GetAuthStatus": true,
|
||||
"/slash.api.v1.AuthService/GetAuthStatus": true,
|
||||
"/slash.api.v1.ShortcutService/GetShortcutByName": true,
|
||||
"/slash.api.v1.ShortcutService/GetShortcut": true,
|
||||
"/slash.api.v1.CollectionService/GetCollectionByName": true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user