Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
twitter_syncer
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
Odysseus
twitter_syncer
Commits
31102e46
Commit
31102e46
authored
Mar 19, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove apiconfig check for follower task
parent
8d20dd37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
api_service.go
api_service.go
+16
-14
No files found.
api_service.go
View file @
31102e46
...
...
@@ -218,20 +218,7 @@ func TaskAdd(c *fiber.Ctx) error {
Msg
:
"must provide TaskId and TaskType"
,
})
}
// check the config is valid or not.
user
,
err
:=
NewClient
(
req
.
ApiConfig
,
nil
)
.
MyInfo
()
if
err
!=
nil
{
return
c
.
JSON
(
Res
{
Code
:
500
,
Msg
:
"get api owner info failed "
+
err
.
Error
(),
})
}
if
user
.
UserId
!=
req
.
User
{
return
c
.
JSON
(
Res
{
Code
:
500
,
Msg
:
"user_id not match with the api owner"
,
})
}
var
err
error
// 校验任务 条件是否存在;
if
exist
,
err
:=
CheckTaskExist
(
req
.
User
,
req
.
TaskId
,
req
.
TaskType
);
err
!=
nil
{
...
...
@@ -269,6 +256,21 @@ func TaskAdd(c *fiber.Ctx) error {
})
}
}
else
{
// check the config is valid or not.
user
,
err
:=
NewClient
(
req
.
ApiConfig
,
nil
)
.
MyInfo
()
if
err
!=
nil
{
return
c
.
JSON
(
Res
{
Code
:
500
,
Msg
:
"get api owner info failed "
+
err
.
Error
(),
})
}
if
user
.
UserId
!=
req
.
User
{
return
c
.
JSON
(
Res
{
Code
:
500
,
Msg
:
"user_id not match with the api owner"
,
})
}
}
// create a taskJob.
...
...
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