mirror of https://github.com/logos-co/open-law.git
fix rename(local)
This commit is contained in:
parent
757c9d1a03
commit
2e18863200
|
@ -40,7 +40,7 @@ export function renameCollection() {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
label: newLabel,
|
||||
csrf_token: scrfInput.value,
|
||||
csrf_token: scrfInput ? scrfInput.value : '',
|
||||
}),
|
||||
});
|
||||
if (response.status == 200) {
|
||||
|
|
|
@ -12,7 +12,6 @@ export function renameSection() {
|
|||
document.querySelectorAll(`[id^="edit-section-label-"]`);
|
||||
const scrfInput: HTMLInputElement =
|
||||
document.querySelector('#csrf_token');
|
||||
console.log(scrfInput.value);
|
||||
const oldName = inputsForRename[index].value;
|
||||
inputsForRename[index].removeAttribute('readonly');
|
||||
inputsForRename[index].value = oldName;
|
||||
|
@ -44,7 +43,7 @@ export function renameSection() {
|
|||
body: JSON.stringify({
|
||||
label: newLabel,
|
||||
section_id: sectionId,
|
||||
csrf_token: scrfInput.value,
|
||||
csrf_token: scrfInput ? scrfInput.value : '',
|
||||
}),
|
||||
});
|
||||
if (response.status == 200) {
|
||||
|
|
|
@ -44,7 +44,7 @@ export function renameSubCollection() {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
label: newLabel,
|
||||
csrf_token: scrfInput.value,
|
||||
csrf_token: scrfInput ? scrfInput.value : '',
|
||||
}),
|
||||
});
|
||||
if (response.status == 200) {
|
||||
|
|
Loading…
Reference in New Issue