-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from NSWC-Crane/CHRIS_DEV
Reference pull request for full details.
- Loading branch information
Showing
418 changed files
with
569,316 additions
and
14,711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
node_modules/ | ||
/.vs | ||
.vs | ||
.nx | ||
.angular | ||
.vscode | ||
.env | ||
*.log | ||
*.tmp | ||
*.swp | ||
**/README.md | ||
**/.env | ||
**/dist | ||
/.vs | ||
client/.angular | ||
client/.nx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
!####################################################################### | ||
! C-PATTM SOFTWARE | ||
! CRANE C-PATTM plan of action and milestones software. Use is governed by the Open Source Academic Research License Agreement contained in the file | ||
! crane_C_PAT.1_license.txt, which is part of this software package. BY | ||
! USING OR MODIFYING THIS SOFTWARE, YOU ARE AGREEING TO THE TERMS AND | ||
! CONDITIONS OF THE LICENSE. | ||
!######################################################################## | ||
*/ | ||
|
||
const marketplaceService = require('../Services/marketplaceService'); | ||
|
||
module.exports.getAllThemes = async function getAllThemes(req, res, next) { | ||
try { | ||
const themes = await marketplaceService.getAllThemes(); | ||
res.status(200).json(themes); | ||
} catch (error) { | ||
res.status(500).json({ error: 'Internal Server Error', detail: error.message }); | ||
} | ||
}; | ||
|
||
module.exports.purchaseTheme = async function purchaseTheme(req, res, next) { | ||
try { | ||
const { userId, themeId } = req.body; | ||
const result = await marketplaceService.purchaseTheme(userId, themeId); | ||
if (result.success) { | ||
res.status(200).json(result.message); | ||
} else { | ||
res.status(400).json(result.message); | ||
} | ||
} catch (error) { | ||
res.status(500).json({ error: 'Internal Server Error', detail: error.message }); | ||
} | ||
}; | ||
|
||
module.exports.getUserThemes = async function getUserThemes(req, res, next) { | ||
try { | ||
const userId = req.params.userId; | ||
const themes = await marketplaceService.getUserThemes(userId); | ||
res.status(200).json(themes); | ||
} catch (error) { | ||
res.status(500).json({ error: 'Internal Server Error', detail: error.message }); | ||
} | ||
}; | ||
|
||
module.exports.getUserPoints = async function getUserPoints(req, res, next) { | ||
try { | ||
const userId = req.params.userId; | ||
const points = await marketplaceService.getUserPoints(userId); | ||
res.status(200).json(points); | ||
} catch (error) { | ||
res.status(500).json({ error: 'Internal Server Error', detail: error.message }); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.