mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-29 00:35:40 +02:00
fix: #14112, federation/rules and relays ACP pages not refreshing table properly on changes, basic form validation
This commit is contained in:
@@ -110,8 +110,11 @@ Admin.activitypub.reorderRules = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await activitypub.rules.list());
|
||||
};
|
||||
|
||||
Admin.activitypub.addRelay = async (req, res) => {
|
||||
Admin.activitypub.addRelay = async (req, res, next) => {
|
||||
const { url } = req.body;
|
||||
if (!url) {
|
||||
return next();
|
||||
}
|
||||
|
||||
await activitypub.relays.add(url);
|
||||
helpers.formatApiResponse(200, res, await activitypub.relays.list());
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<form role="form">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="url">Relay URL</label>
|
||||
<input type="text" id="url" name="url" title="Relay URL" class="form-control" placeholder="https://example.org/actor">
|
||||
<input type="url" id="url" name="url" title="Relay URL" class="form-control" placeholder="https://example.org/actor" required>
|
||||
</div>
|
||||
</form>
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="value">Value</label>
|
||||
<input type="text" id="value" name="value" title="Value" class="form-control" placeholder="forum">
|
||||
<input type="text" id="value" name="value" title="Value" class="form-control" placeholder="forum" required>
|
||||
<p class="form-text" id="help-text"></p>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
|
||||
Reference in New Issue
Block a user