Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed Jan 19, 2025
1 parent 44751c2 commit 6cb3274
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/routes/user/apps/appdefinition/AppDefinitionRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ApiStatusCodes from '../../../../api/ApiStatusCodes'
import BaseApi from '../../../../api/BaseApi'
import InjectionExtractor from '../../../../injection/InjectionExtractor'
import { AppDeployTokenConfig, IAppDef } from '../../../../models/AppDefinition'
import { ICaptainDefinition } from '../../../../models/ICaptainDefinition'
import { CaptainError } from '../../../../models/OtherTypes'
import CaptainManager from '../../../../user/system/CaptainManager'
import CaptainConstants from '../../../../utils/CaptainConstants'
Expand All @@ -11,13 +12,6 @@ import Utils from '../../../../utils/Utils'

const router = express.Router()

const DEFAULT_APP_CAPTAIN_DEFINITION = JSON.stringify({
schemaVersion: 2,
dockerfileLines: [
`FROM ${CaptainConstants.configs.appPlaceholderImageName}`,
],
})

// unused images
router.get('/unusedImages', function (req, res, next) {
return Promise.resolve()
Expand Down Expand Up @@ -216,11 +210,17 @@ router.post('/register/', function (req, res, next) {
appCreated = true
})
.then(function () {
const captainDefinitionContent: ICaptainDefinition = {
schemaVersion: 2,
imageName: CaptainConstants.configs.appPlaceholderImageName,
}

const promiseToIgnore = serviceManager
.scheduleDeployNewVersion(appName, {
captainDefinitionContentSource: {
captainDefinitionContent:
DEFAULT_APP_CAPTAIN_DEFINITION,
captainDefinitionContent: JSON.stringify(
captainDefinitionContent
),
gitHash: '',
},
})
Expand Down

0 comments on commit 6cb3274

Please sign in to comment.