-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robin
authored and
Robin
committed
Dec 15, 2023
1 parent
a1ab8a6
commit c9e66b0
Showing
4 changed files
with
261 additions
and
177 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
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,23 @@ | ||
var winston = require('../../../logger') | ||
|
||
const apiIssues = {} | ||
|
||
apiIssues.create = function (req, res) { | ||
const IssueSchema = require('../../../models/issue') | ||
const issueSchema = req.body | ||
winston.warn('Public account creation was attempted while disabled!',issueSchema) | ||
|
||
// Issue Creation | ||
const issue = new IssueSchema({ | ||
...issueSchema | ||
}) | ||
|
||
issue.save(function (err, issue) { | ||
if (err) return res.status(400).json({ success: false, error: 'Error: ' + err.message }) | ||
|
||
res.json({ success: true, error: null, issue: issue }) | ||
}) | ||
|
||
} | ||
|
||
module.exports = apiIssues |
Oops, something went wrong.