mirror of
https://github.com/ershisan99/coolify.git
synced 2026-02-01 12:34:39 +00:00
fix: Branch used does not throw error
This commit is contained in:
@@ -14,13 +14,11 @@ export const get: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
const found = await db.isBranchAlreadyUsed({ repository, branch, id });
|
||||
if (found) {
|
||||
throw {
|
||||
error: `Branch ${branch} is already used by another application`
|
||||
};
|
||||
}
|
||||
return {
|
||||
status: 200
|
||||
status: 200,
|
||||
body: {
|
||||
used: found ? true : false
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
|
||||
Reference in New Issue
Block a user