ソースを参照

fix updating for AppRule. adjust HN userblocker config

tags/v0.2.0
Jonathan Cobb 5年前
コミット
9fe0df3327
2個のファイルの変更4行の追加4行の削除
  1. +3
    -3
      bubble-server/src/main/java/bubble/model/app/AppRule.java
  2. +1
    -1
      bubble-server/src/main/resources/models/apps/user_block/hn/bubbleApp_userBlock_hn.json

+ 3
- 3
bubble-server/src/main/java/bubble/model/app/AppRule.java ファイルの表示

@@ -43,8 +43,8 @@ import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;
})
public class AppRule extends IdentifiableBaseParentEntity implements AppTemplateEntity, HasPriority {

public static final String[] VALUE_FIELDS = {"driver", "configJson", "template", "enabled"};
public static final String[] CREATE_FIELDS = ArrayUtil.append(VALUE_FIELDS, "name");
public static final String[] UPDATE_FIELDS = {"configJson", "template", "enabled"};
public static final String[] CREATE_FIELDS = ArrayUtil.append(UPDATE_FIELDS, "driver", "app", "name");

@ECSearchable(filter=true) @ECField(index=10)
@HasValue(message="err.name.required")
@@ -107,7 +107,7 @@ public class AppRule extends IdentifiableBaseParentEntity implements AppTemplate
setUuid(null);
}

@Override public Identifiable update(Identifiable other) { copy(this, other, VALUE_FIELDS); return this; }
@Override public Identifiable update(Identifiable other) { copy(this, other, UPDATE_FIELDS); return this; }

@Transient public JsonNode getConfig () { return json(configJson, JsonNode.class); }
public AppRule setConfig(JsonNode config) { return setConfigJson(json(config)); }


+ 1
- 1
bubble-server/src/main/resources/models/apps/user_block/hn/bubbleApp_userBlock_hn.json ファイルの表示

@@ -22,7 +22,7 @@
],
"commentDecorator": {
"regex": "class=\"age\"\\s*>.+?</span>",
"insert": "<a href=\"{{{blockUrl}}}\">BLOCK</a>"
"insert": " <a href=\"{{{blockUrl}}}\"><b>[X]</b></a> "
}
}
}]


読み込み中…
キャンセル
保存