mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
refactor: code documentation
This commit is contained in:
1 parent
0e5e1132ec
commit
27923ca264
1 file changed
+7
-3
@@ -128,14 +128,18 @@
|
||||
? selected.resource?.actions
|
||||
: selected.service?.actions;
|
||||
|
||||
const resourceAction = availableActions.find(
|
||||
// We need to check if the selected action is still
|
||||
// on the available list, and if so, change it to the
|
||||
// new one, as it may contain different attributes
|
||||
const availableAction = availableActions.find(
|
||||
(a) => a.name === selected.action?.name
|
||||
);
|
||||
if (!resourceAction) {
|
||||
|
||||
if (!availableAction) {
|
||||
selected.action = null;
|
||||
selected.attribute = null;
|
||||
} else {
|
||||
selected.action = resourceAction;
|
||||
selected.action = availableAction;
|
||||
console.log(selected.action);
|
||||
if (!selected?.action?.attributes?.includes(selected.attribute)) {
|
||||
selected.attribute = null;
|
||||
|
||||
Reference in new issue
Block a user