|
@@ -1479,7 +1479,49 @@ function getlxfilebyid(id) {
|
|
|
if (_token) {
|
|
|
$.ajax(`/api/web/v1/blockpy/project/` + id, {
|
|
|
type: "GET",
|
|
|
- headers: { 'Authorization': "Bearer " + _token },
|
|
|
+ headers: { 'Authorization': "Bearer " + _token },
|
|
|
+ success: (data) => {
|
|
|
+ cb(data)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function dellxfilebyid(id) {
|
|
|
+ var _token = window.localStorage.Token;
|
|
|
+ if (_token) {
|
|
|
+ $.ajax(`/api/web/v1/blockpy/project/del/` + id, {
|
|
|
+ type: "GET",
|
|
|
+ headers: { 'Authorization': "Bearer " + _token },
|
|
|
+ success: (data) => {
|
|
|
+ cb(data)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function upadtelxfilenamebyid(id, title) {
|
|
|
+ var _token = window.localStorage.Token;
|
|
|
+ if (_token) {
|
|
|
+ $.ajax(`/api/web/v1/blockpy/project/title/update`, {
|
|
|
+ type: "POST",
|
|
|
+ headers: { 'Authorization': "Bearer " + _token, 'content-type': "application/json;charset=UTF-8" },
|
|
|
+ data: { id: id, title: title },
|
|
|
+ success: (data) => {
|
|
|
+ cb(data)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function uploadlxfilecontentbyid(id, code) {
|
|
|
+ var _token = window.localStorage.Token;
|
|
|
+ if (_token) {
|
|
|
+ $.ajax(`/api/web/v1/blockpy/project/code/update`, {
|
|
|
+ type: "POST",
|
|
|
+ headers: { 'Authorization': "Bearer " + _token, 'content-type': "application/json;charset=UTF-8" },
|
|
|
+ data: { id: id, code: code },
|
|
|
success: (data) => {
|
|
|
cb(data)
|
|
|
}
|