Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
Commit
2b48477d
authored
Dec 16, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改docker-compose.yml
parent
3b0b139c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
docker-compose.yml
+3
-3
model/channel.go
+1
-0
No files found.
docker-compose.yml
View file @
2b48477d
version
:
'
3.4'
version
:
'
3.4'
services
:
services
:
one
-api
:
new
-api
:
image
:
calciumion/new-api:latest
image
:
calciumion/new-api:latest
container_name
:
one
-api
container_name
:
new
-api
restart
:
always
restart
:
always
command
:
--log-dir /app/logs
command
:
--log-dir /app/logs
ports
:
ports
:
...
@@ -12,7 +12,7 @@ services:
...
@@ -12,7 +12,7 @@ services:
-
./data:/data
-
./data:/data
-
./logs:/app/logs
-
./logs:/app/logs
environment
:
environment
:
-
SQL_DSN=root:123456@tcp(host.docker.internal:3306)/
one
-api
# 修改此行,或注释掉以使用 SQLite 作为数据库
-
SQL_DSN=root:123456@tcp(host.docker.internal:3306)/
new
-api
# 修改此行,或注释掉以使用 SQLite 作为数据库
-
REDIS_CONN_STRING=redis://redis
-
REDIS_CONN_STRING=redis://redis
-
SESSION_SECRET=random_string
# 修改为随机字符串
-
SESSION_SECRET=random_string
# 修改为随机字符串
-
TZ=Asia/Shanghai
-
TZ=Asia/Shanghai
...
...
model/channel.go
View file @
2b48477d
...
@@ -99,6 +99,7 @@ func BatchDeleteChannels(ids []int) error {
...
@@ -99,6 +99,7 @@ func BatchDeleteChannels(ids []int) error {
if
err
!=
nil
{
if
err
!=
nil
{
// 回滚事务
// 回滚事务
tx
.
Rollback
()
tx
.
Rollback
()
return
err
}
}
// 提交事务
// 提交事务
tx
.
Commit
()
tx
.
Commit
()
...
...
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