diff --git a/README.md b/README.md
index 75aaecc..6aa8f47 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,22 @@
# Support TIK
+
+Session gh init
+```sh
+user_session
+__Host-user_session_same_site
+ centang secure
+```
+
+
+
+```sh
+_gh_sess
+tz
+dotcom_user
+logged_in
+has_recent_activity
+_device_id
+preferred_color_mode
+color_mode
+_octo
+```
diff --git a/index.html b/index.html
index eee2a54..0540174 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
-
Issues | Support HelpDesk
+ Lapor Insiden | Acad CSIRT
@@ -93,7 +93,7 @@
- Support
+ Lapor
- Help & Support
+ Help & Lapor
@@ -342,13 +342,13 @@ Customizer
-
Buat Issues Baru
+
Lapor Insiden
-
+
-
+
@@ -447,7 +447,7 @@
-->
-
+
diff --git a/js/controller/bot.js b/js/controller/bot.js
new file mode 100644
index 0000000..17f4a11
--- /dev/null
+++ b/js/controller/bot.js
@@ -0,0 +1 @@
+const _0x5b2a08=_0x3e21;(function(_0x3aa218,_0x4f411f){const _0x409f27=_0x3e21,_0x1c56af=_0x3aa218();while(!![]){try{const _0x19fdd0=-parseInt(_0x409f27(0xc0))/0x1*(parseInt(_0x409f27(0xbe))/0x2)+-parseInt(_0x409f27(0xbb))/0x3+parseInt(_0x409f27(0xb9))/0x4*(parseInt(_0x409f27(0xbc))/0x5)+-parseInt(_0x409f27(0xba))/0x6*(parseInt(_0x409f27(0xb8))/0x7)+-parseInt(_0x409f27(0xbf))/0x8+-parseInt(_0x409f27(0xb5))/0x9+parseInt(_0x409f27(0xb7))/0xa*(parseInt(_0x409f27(0xbd))/0xb);if(_0x19fdd0===_0x4f411f)break;else _0x1c56af['push'](_0x1c56af['shift']());}catch(_0x5f366b){_0x1c56af['push'](_0x1c56af['shift']());}}}(_0x29e2,0x964a7));function _0x29e2(){const _0x3a5a82=['1620996MPeTrV','5hNSmIj','112409EEfQGt','50dFuuUo','7597288aQyCxB','35922pbGciR','594441ldHPhh','Z2l0aHViX3BhdF8xMUJBV041RFEwNHhmNmFubnI2aGhxX21MU0J2bkVOZ05RUndRMmVtTVpiTXVkb1RtRktDbTlMME9DNkJ0ckJidjJMSjU0NFJLU3VMUkp3Z040','2390LOQFSX','931RPvAbd','4660244HyGXHf','24258FRgppS'];_0x29e2=function(){return _0x3a5a82;};return _0x29e2();}function _0x3e21(_0x48f0e5,_0x49c809){const _0x29e227=_0x29e2();return _0x3e21=function(_0x3e2141,_0x462aa2){_0x3e2141=_0x3e2141-0xb5;let _0x47ed89=_0x29e227[_0x3e2141];return _0x47ed89;},_0x3e21(_0x48f0e5,_0x49c809);}export const iteungbot=_0x5b2a08(0xb6);
\ No newline at end of file
diff --git a/js/controller/issues.js b/js/controller/issues.js
index 76a11bf..a97ac4f 100644
--- a/js/controller/issues.js
+++ b/js/controller/issues.js
@@ -1,55 +1,31 @@
-
-import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
import Swal from "https://cdn.skypack.dev/sweetalert2@11.1.2";
-
-document.addEventListener('DOMContentLoaded', () => {
- const uhuy = 'Z2hwX2lmVW94RGVyaWdxWDdicXg4RzdFNklMczlQTUtGVTJnaVlZZg==';
- const octokit = new Octokit({
- auth: atob(uhuy)
- });
-
- const form = document.getElementById('issuesform');
-
- form.addEventListener('submit', async (e) => {
- e.preventDefault();
-
- const title = document.getElementById('inputtittle').value;
- const body = document.getElementById('inputbody').value;
- const milestone = parseInt(document.getElementById('inputmilestone').value);
- const assigneeSelect = document.getElementById('inputassigness');
- const assignees = [assigneeSelect.options[assigneeSelect.selectedIndex].value];
-
- const labelsSelect = document.getElementById('inputlabels');
- const labels = Array.from(labelsSelect.selectedOptions, option => option.value);
-
-
- try {
- const response = await octokit.request('POST /repos/dtiulbi/question-ticketing/issues', {
- owner: 'dtiulbi',
- repo: 'question-ticketing',
- title,
- assignees,
- milestone,
- labels,
- body,
- headers: {
- 'X-GitHub-Api-Version': '2022-11-28',
- 'Accept': 'application/vnd.github.v3+json'
-
- }
- });
- console.log('Issue created:', response);
- showModal('Pengajuan Tiket Layanan Akan Proses', response);
-
- } catch (error) {
- console.error('Failed to create issue:', error);
- showModalerror('Gagal Mengirim Pengajuan Pastikan Sudah Diisi Semua', error);
-
- }
- });
- });
-
- function showModal(message) {
+import {onClick,getValue} from "https://jscroot.github.io/element/croot.js";
+import {postWithBearer} from "https://jscroot.github.io/api/github.js";
+import { iteungbot } from "./bot.js";
+
+onClick("submitButton",kirimIssues);
+
+function kirimIssues(){
+ let data = {
+ title : getValue("inputtittle"),
+ assignees : [getValue("inputassigness")],
+ milestone : Number(getValue("inputmilestone")),
+ labels : [getValue("inputlabels")],
+ body : getValue("inputbody"),
+ }
+ postWithBearer("https://api.github.com/repos/acadcsirt/lapor/issues",atob(iteungbot),data,responseFunction)
+}
+
+function responseFunction(response){
+ console.log('Issue created:', response);
+ if(response.message === "Validation Failed"){
+ showModalerror('Gagal Mengirim Laporan Pastikan Sudah Diisi Semua ' + response.errors[0].code);
+ } else{
+ showModal('ID Laporan ' + response.id);
+ }
+}
+
+function showModal(message) {
Swal.fire({
title: 'Selamat!',
text: message,
@@ -60,7 +36,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
}
- function showModalerror(message, error) {
+function showModalerror(message, error) {
Swal.fire({
icon: 'error',
title: 'Oops...',