Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskcenter
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
taskcenter
Commits
297aad54
Commit
297aad54
authored
Jan 24, 2025
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add web platform
parent
fbde5348
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
constant.go
constant/constant.go
+5
-0
dao.go
dao/dao.go
+2
-4
No files found.
constant/constant.go
View file @
297aad54
...
...
@@ -22,6 +22,7 @@ const (
TaskPlatformTwitter
=
"twitter"
TaskPlatformTelegram
=
"telegram"
TaskPlatformAppbase
=
"appbase"
TaskPlatformWeb
=
"web"
)
var
validPlatforms
=
map
[
string
]
bool
{
...
...
@@ -29,6 +30,7 @@ var validPlatforms = map[string]bool{
TaskPlatformTwitter
:
true
,
TaskPlatformTelegram
:
true
,
TaskPlatformAppbase
:
true
,
TaskPlatformWeb
:
true
,
}
func
IsValidPlatform
(
platform
string
)
bool
{
...
...
@@ -48,6 +50,7 @@ const (
TaskActionSignIn
=
"signIn"
TaskActionPremiumSignIn
=
"premiumSignIn"
TaskActionMiniapp
=
"minapp"
TaskActionWeb
=
"web"
)
var
validActions
=
map
[
string
]
bool
{
...
...
@@ -62,6 +65,7 @@ var validActions = map[string]bool{
TaskActionSignIn
:
true
,
TaskActionPremiumSignIn
:
true
,
TaskActionMiniapp
:
true
,
TaskActionWeb
:
true
,
}
func
IsValidAction
(
action
string
)
bool
{
...
...
@@ -74,6 +78,7 @@ var TaskAction = map[string][]string{
TaskPlatformTelegram
:
{
TaskActionJoin
,
TaskActionActive
,
TaskActionBind
,
TaskActionMiniapp
},
TaskPlatformTwitter
:
{
TaskActionFollow
,
TaskActionLike
,
TaskActionReply
,
TaskActionRetweet
},
TaskPlatformAppbase
:
{
TaskActionSignIn
,
TaskActionPremiumSignIn
},
TaskPlatformWeb
:
{
TaskActionWeb
},
}
const
(
...
...
dao/dao.go
View file @
297aad54
...
...
@@ -7,7 +7,6 @@ import (
dbModel
"taskcenter/model/db"
"time"
"github.com/supabase-community/supabase-go"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/logger"
...
...
@@ -15,9 +14,8 @@ import (
)
type
Dao
struct
{
c
*
config
.
Config
db
*
gorm
.
DB
supa
*
supabase
.
Client
c
*
config
.
Config
db
*
gorm
.
DB
}
func
New
(
_c
*
config
.
Config
)
(
dao
*
Dao
,
err
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