aboutsummaryrefslogtreecommitdiffhomepage
path: root/public
diff options
context:
space:
mode:
authorMarvin Borner2018-07-07 13:14:04 +0200
committerMarvin Borner2018-07-07 13:14:04 +0200
commit3a8cdacbd4522c47766e6679454a7b7cd91bf0bd (patch)
tree2a60bccb52003c887887d4fa6310f2f798413f7e /public
parent0a11d1058cb96801dce64d035fd1e269976793a8 (diff)
Added ajax test for public key insertment
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js
index b33a2d9..24bab84 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -347,7 +347,7 @@ eval("$(\"#avatarFile\").on(\"change\", function () {\n var preview = documen
/* 42 */
/***/ (function(module, exports) {
-eval("// var openpgp = window.openpgp;\n\n// var options = {\n// userIds: [{ name:'Marvin Borner', email:'test@test.de' }], // multiple user IDs\n// numBits: 4096, // RSA key size\n// passphrase: 'cool password of private key'\n// };\n\n// openpgp.generateKey(options).then(function(key) {\n// var privateKey = key.privateKeyArmored; // '-----BEGIN PGP PRIVATE KEY BLOCK ... '\n// var publicKey = key.publicKeyArmored; // '-----BEGIN PGP PUBLIC KEY BLOCK ... '\n\n// console.log(publicKey);\n// console.log(privateKey);\n// });\n\n\nvar socket = io('http://127.0.0.1:8890', {\n transports: ['websocket']\n});\nsocket.on('message', function (data) {\n data = JSON.parse(data);\n $(\"#messages\").append(\"<p>\" + data.user + \" : \" + data.message + \"</p>\");\n});\n\n$('input.send').click(function (e) {\n e.preventDefault();\n sendMessage();\n});\n\nfunction sendMessage() {\n var message = $('input.message').val();\n $('input.message').val(\"\");\n $.ajax({\n type: \"POST\",\n url: \"sendMessage\",\n data: {\n \"_token\": $('meta[name=\"csrf-token\"]').attr('content'),\n \"message\": message\n },\n cache: false,\n success: function success(results) {}\n });\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlY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Jzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///42\n");
+eval("// var openpgp = window.openpgp;\n\n// var options = {\n// userIds: [{ name:'Marvin Borner', email:'test@test.de' }], // multiple user IDs\n// numBits: 4096, // RSA key size\n// passphrase: 'cool password of private key'\n// };\n\n// openpgp.generateKey(options).then(function(key) {\n// var privateKey = key.privateKeyArmored; // '-----BEGIN PGP PRIVATE KEY BLOCK ... '\n// var publicKey = key.publicKeyArmored; // '-----BEGIN PGP PUBLIC KEY BLOCK ... '\n\n// console.log(publicKey);\n// console.log(privateKey);\n// });\n\n// $.ajax({\n// type: \"POST\",\n// url: \"keys/public/1\",\n// data: {\n// \"key\": \"test_key_2\"\n// },\n// cache: false,\n// success: (results) => {\n// console.log(results);\n// }\n// });\n\n\nvar socket = io('http://127.0.0.1:8890', {\n transports: ['websocket']\n});\nsocket.on('message', function (data) {\n data = JSON.parse(data);\n $(\"#messages\").append(\"<p>\" + data.user + \" : \" + data.message + \"</p>\");\n});\n\n$('input.send').click(function (e) {\n e.preventDefault();\n sendMessage();\n});\n\nfunction sendMessage() {\n var message = $('input.message').val();\n $('input.message').val(\"\");\n $.ajax({\n type: \"POST\",\n url: \"sendMessage\",\n data: {\n \"message\": message\n },\n cache: false\n });\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NoYXQuanM/NjE1NCJdLCJuYW1lcyI6WyJzb2NrZXQiLCJpbyIsInRyYW5zcG9ydHMiLCJvbiIsImRhdGEiLCJKU09OIiwicGFyc2UiLCIkIiwiYXBwZW5kIiwidXNlciIsIm1lc3NhZ2UiLCJjbGljayIsImUiLCJwcmV2ZW50RGVmYXVsdCIsInNlbmRNZXNzYWdlIiwidmFsIiwiYWpheCIsInR5cGUiLCJ1cmwiLCJjYWNoZSJdLCJtYXBwaW5ncyI6IkF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