Better handling of user fork
This commit is contained in:
1 parent
480d4121da
commit
f318bcdf15
3 files changed
+14
-63
No files matched your search
@@ -1315,8 +1315,6 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
case 'createGithubFork': {
|
||||
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.createGithubFork(
|
||||
params.repository,
|
||||
params.username,
|
||||
params.token
|
||||
)
|
||||
|
||||
@@ -1355,8 +1353,21 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
let error
|
||||
|
||||
await checkFork()
|
||||
await updateUser()
|
||||
|
||||
async function checkFork() {
|
||||
let serverResponse = await PL.servers.GITHUB_SERVER.createGithubFork(
|
||||
params.token
|
||||
)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
|
||||
|
||||
if(error != undefined) {
|
||||
console.log('[ERROR] httpInterface -> Gov -> createFork -> You already have a fork. Good for you!')
|
||||
}
|
||||
}
|
||||
|
||||
async function updateUser() {
|
||||
|
||||
await doGithubUser()
|
||||
|
||||
Reference in new issue
Block a user