Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
9bbee60c
authored
Feb 27, 2025
by
Finley Ge
Committed by
GitHub
Feb 27, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ts error (#3911)
parent
9f57ad00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
packages/service/support/permission/publish/authLink.ts
+8
-4
projects/app/src/pageComponents/app/detail/Publish/Link/index.tsx
+3
-3
projects/app/src/web/common/utils/voice.ts
+2
-2
No files found.
packages/service/support/permission/publish/authLink.ts
View file @
9bbee60c
import
{
AppDetailType
}
from
'@fastgpt/global/core/app/type'
;
import
{
OutLinkSchema
}
from
'@fastgpt/global/support/outLink/type'
;
import
{
Out
linkAppType
,
Out
LinkSchema
}
from
'@fastgpt/global/support/outLink/type'
;
import
{
parseHeaderCert
}
from
'../controller'
;
import
{
MongoOutLink
}
from
'../../outLink/schema'
;
import
{
OutLinkErrEnum
}
from
'@fastgpt/global/common/error/code/outLink'
;
...
...
@@ -54,11 +54,15 @@ export async function authOutLinkCrud({
}
/* outLink exist and it app exist */
export
async
function
authOutLinkValid
({
shareId
}:
{
shareId
?:
string
})
{
export
async
function
authOutLinkValid
<
T
extends
OutlinkAppType
=
any
>
({
shareId
}:
{
shareId
?:
string
;
})
{
if
(
!
shareId
)
{
return
Promise
.
reject
(
OutLinkErrEnum
.
linkUnInvalid
);
}
const
outLinkConfig
=
await
MongoOutLink
.
findOne
({
shareId
}).
lean
();
const
outLinkConfig
=
await
MongoOutLink
.
findOne
({
shareId
}).
lean
<
OutLinkSchema
<
T
>>
();
if
(
!
outLinkConfig
)
{
return
Promise
.
reject
(
OutLinkErrEnum
.
linkUnInvalid
);
...
...
@@ -66,6 +70,6 @@ export async function authOutLinkValid({ shareId }: { shareId?: string }) {
return
{
appId
:
outLinkConfig
.
appId
,
outLinkConfig
outLinkConfig
:
outLinkConfig
};
}
projects/app/src/pageComponents/app/detail/Publish/Link/index.tsx
View file @
9bbee60c
...
...
@@ -353,7 +353,7 @@ function EditLinkModal({
<
Flex
alignItems=
{
'center'
}
mt=
{
4
}
>
<
Flex
flex=
{
'0 0 90px'
}
alignItems=
{
'center'
}
>
<
FormLabel
>
QPM
</
FormLabel
>
<
QuestionTip
ml=
{
1
}
label=
{
publishT
(
'qpm_tips'
||
''
)
}
></
QuestionTip
>
<
QuestionTip
ml=
{
1
}
label=
{
publishT
(
'qpm_tips'
)
}
></
QuestionTip
>
</
Flex
>
<
Input
max=
{
1000
}
...
...
@@ -418,7 +418,7 @@ function EditLinkModal({
<
FormLabel
>
{
t
(
'common:support.outlink.share.Response Quote'
)
}
</
FormLabel
>
<
QuestionTip
ml=
{
1
}
label=
{
t
(
'common:support.outlink.share.Response Quote tips'
||
''
)
}
label=
{
t
(
'common:support.outlink.share.Response Quote tips'
)
}
></
QuestionTip
>
</
Flex
>
<
Switch
{
...
register
('
responseDetail
')}
isChecked=
{
responseDetail
}
/>
...
...
@@ -428,7 +428,7 @@ function EditLinkModal({
<
FormLabel
>
{
t
(
'common:support.outlink.share.show_complete_quote'
)
}
</
FormLabel
>
<
QuestionTip
ml=
{
1
}
label=
{
t
(
'common:support.outlink.share.show_complete_quote_tips'
||
''
)
}
label=
{
t
(
'common:support.outlink.share.show_complete_quote_tips'
)
}
></
QuestionTip
>
</
Flex
>
<
Switch
...
...
projects/app/src/web/common/utils/voice.ts
View file @
9bbee60c
...
...
@@ -178,7 +178,7 @@ export const useAudioPlay = (
await
new
Promise
((
resolve
)
=>
{
sourceBuffer
.
onupdateend
=
resolve
;
sourceBuffer
.
appendBuffer
(
value
.
buffer
);
sourceBuffer
.
appendBuffer
(
value
.
buffer
as
any
);
});
}
}
catch
(
error
)
{
...
...
@@ -311,7 +311,7 @@ export const useAudioPlay = (
await
new
Promise
((
resolve
)
=>
{
buffer
.
onupdateend
=
resolve
;
buffer
.
appendBuffer
(
value
.
buffer
);
buffer
.
appendBuffer
(
value
.
buffer
as
any
);
});
}
}
catch
(
error
)
{
...
...
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