events #2

Merged
v4l3n71n merged 23 commits from events into master 2023-11-20 22:41:56 +00:00
4 changed files with 6 additions and 12 deletions
Showing only changes of commit ed6d7dc4f1 - Show all commits

View File

@ -232,5 +232,5 @@
<script src="../js/config.js"></script> <script src="../js/config.js"></script>
<script src="../js/library.js"></script> <script src="../js/library.js"></script>
<script src="../js/addUser.js"></script> <script src="../js/addItem.js"></script>
</body></html> </body></html>

View File

@ -232,5 +232,5 @@
<script src="../js/config.js"></script> <script src="../js/config.js"></script>
<script src="../js/library.js"></script> <script src="../js/library.js"></script>
<script src="../js/addUser.js"></script> <script src="../js/addItem.js"></script>
</body></html> </body></html>

View File

@ -350,5 +350,5 @@
<script src="../js/config.js"></script> <script src="../js/config.js"></script>
<script src="../js/library.js"></script> <script src="../js/library.js"></script>
<script src="../js/user.js"></script> <script src="../js/item.js"></script>
</body></html> </body></html>

View File

@ -1,6 +1,7 @@
checkToken(); checkToken();
signOut(); signOut();
closeButton(); closeButton();
pathURL = document.location.pathname.split("/")[document.location.pathname.split("/").length-1].split(".")[0].replace("add","")
document.getElementById("addUser").addEventListener("click", function(){ document.getElementById("addUser").addEventListener("click", function(){
@ -25,25 +26,18 @@ document.getElementById("addUser").addEventListener("click", function(){
} }
dataPut = { dataPut = {
"id": "",
"username": document.getElementById("usernameUpdateInput").value, "username": document.getElementById("usernameUpdateInput").value,
"email": document.getElementById("emailUpdateInput").value, "email": document.getElementById("emailUpdateInput").value,
"name": document.getElementById("nameUpdateInput").value, "name": document.getElementById("nameUpdateInput").value,
"firstName": document.getElementById("firstNameUpdateInput").value, "firstName": document.getElementById("firstNameUpdateInput").value,
"birth": document.getElementById("birthUpdateInput").value, "birth": document.getElementById("birthUpdateInput").value,
"status": 1,
"password": document.getElementById("passwordUpdateInput").value, "password": document.getElementById("passwordUpdateInput").value,
"roles": selector["roles"], "roles": selector["roles"]
"created_at": "",
"updated_at": "",
"deleted_at": "",
"connected_at": ""
} }
instance({ instance({
method : "put", method : "put",
url:"users", url:pathURL+"s",
withCredentials: true, withCredentials: true,
data: dataPut data: dataPut
}).then(function(response){ }).then(function(response){