mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-09 18:32:16 +08:00
修复使用redis存储时无法删除接口的BUG
This commit is contained in:
@@ -74,7 +74,13 @@ public abstract class KeyValueResource implements Resource {
|
||||
|
||||
@Override
|
||||
public boolean delete() {
|
||||
return !readonly() && this.keys().stream().allMatch(this::deleteByKey);
|
||||
if(readonly()){
|
||||
return false;
|
||||
}
|
||||
if(isDirectory()){
|
||||
return this.keys().stream().allMatch(this::deleteByKey);
|
||||
}
|
||||
return deleteByKey(getAbsolutePath());
|
||||
}
|
||||
|
||||
protected boolean deleteByKey(String key) {
|
||||
|
||||
Reference in New Issue
Block a user