Skip to content

Commit 72f7d18

Browse files
committed
fix: db path
1 parent e60e628 commit 72f7d18

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ dist
55
__pycache__
66
target
77
service/uni-token-service
8-
service/data.db
98
frontend/public/release
109
.eslintcache
1110
sdk/node/README.md

service/discovery/file.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ func getServiceJsonPath() string {
3131
return filepath.Join(getServiceRootPath(), "service.json")
3232
}
3333

34+
func GetDbPath() string {
35+
return filepath.Join(getServiceRootPath(), "data.db")
36+
}
37+
3438
func SetupFileDiscovery(port int) error {
3539
filePath := getServiceJsonPath()
3640

service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (p *program) Start(s service.Service) error {
3636
}
3737

3838
func (p *program) run() {
39-
store.Init("data.db")
39+
store.Init(discovery.GetDbPath())
4040

4141
p.logger.Info("Service is running. Starting main logic...")
4242

0 commit comments

Comments
 (0)