diff --git a/core/service.go b/core/service.go index 56b0d46..81b5cd7 100644 --- a/core/service.go +++ b/core/service.go @@ -237,7 +237,7 @@ func (sh *serviceDescription) prepare(mg *Maingate) error { div.Maintenance.link = div.Maintenance.Notice } else { var fd FileDocumentDesc - if err := sh.mongoClient.FindOneAs(CollectionFile, bson.M{ + if err := mg.mongoClient.FindOneAs(CollectionFile, bson.M{ "key": div.Maintenance.Notice, }, &fd, options.FindOne().SetProjection(bson.M{"link": 1})); err != nil { logger.Println(err) diff --git a/make_maingate_package.ps1 b/make_maingate_package.ps1 index 6351629..c539772 100644 --- a/make_maingate_package.ps1 +++ b/make_maingate_package.ps1 @@ -4,24 +4,6 @@ $CurBranch = git branch --show-current Remove-Item maingate.zip -Force -Recurse -ErrorAction SilentlyContinue -cd .. -cd maingate-console - - -git switch $CurBranch -git pull -npm install -npm run build - -Remove-Item console -Force -Recurse -ErrorAction SilentlyContinue -Copy-Item build console -Recurse - -Compress-Archive -Path console -DestinationPath ..\maingate\maingate.zip -Force -Remove-Item console -Force -Recurse - -cd .. -cd maingate - $Env:GOOS="linux" $Env:GOARCH="amd64" go build -ldflags="-s -w" .