Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
movacheckin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
vicotor
movacheckin
Commits
f3d9b7dd
Commit
f3d9b7dd
authored
Aug 31, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update function
parent
f5c52da4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
index.ts
supabase/functions/check_sign/index.ts
+6
-0
No files found.
supabase/functions/check_sign/index.ts
View file @
f3d9b7dd
...
...
@@ -83,6 +83,7 @@ Deno.serve(async (req) => {
console
.
error
(
'
get sign config error:
'
,
configError
)
return
new
Response
(
JSON
.
stringify
({
success
:
false
,
is_signed
:
false
,
message
:
'
not found config
'
}),
{
status
:
500
,
...
...
@@ -102,11 +103,13 @@ Deno.serve(async (req) => {
console
.
error
(
'
Get user info error:
'
,
getError
)
return
new
Response
(
JSON
.
stringify
({
success
:
false
,
is_signed
:
false
,
message
:
'
User info fetch failed
'
}),
{
headers
:
{
...
corsHeaders
,
'
Content-Type
'
:
'
application/json
'
}
})
}
const
is_signed
=
userInfo
.
is_signed
if
(
!
userInfo
.
in_white_list
)
{
// 验证时间范围
...
...
@@ -120,6 +123,7 @@ Deno.serve(async (req) => {
console
.
error
(
'
Not in sign time range
'
)
return
new
Response
(
JSON
.
stringify
({
success
:
false
,
is_signed
:
is_signed
,
message
:
'
not in sign time range
'
}),
{
status
:
400
,
...
...
@@ -132,6 +136,7 @@ Deno.serve(async (req) => {
return
new
Response
(
JSON
.
stringify
({
success
:
true
,
is_signed
:
is_signed
,
message
:
'
success
'
}),
{
headers
:
{
...
corsHeaders
,
'
Content-Type
'
:
'
application/json
'
}
...
...
@@ -141,6 +146,7 @@ Deno.serve(async (req) => {
console
.
error
(
'
Function error:
'
,
error
)
return
new
Response
(
JSON
.
stringify
({
success
:
false
,
is_signed
:
false
,
message
:
'
Internal error
'
}),
{
status
:
500
,
...
...
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