ui/fix: Insane amount

This commit is contained in:
Andras Bacsai
2022-04-08 10:35:16 +02:00
parent 76754ded79
commit 0d0715a340
22 changed files with 509 additions and 490 deletions

View File

@@ -9,11 +9,23 @@ export const post: RequestHandler = async (event) => {
const { id } = event.params;
try {
let { oauthId, groupName, appId, appSecret } = await event.request.json();
let { type, name, htmlUrl, apiUrl, oauthId, appId, appSecret, groupName } =
await event.request.json();
oauthId = Number(oauthId);
await db.addSource({ id, teamId, oauthId, groupName, appId, appSecret });
await db.addGitLabSource({
id,
teamId,
type,
name,
htmlUrl,
apiUrl,
oauthId,
appId,
appSecret,
groupName
});
return { status: 201 };
} catch (error) {
return ErrorHandler(error);