discourse/app/assets/javascripts/discourse-common/addon/helpers/get-url.js
2020-09-04 13:42:47 +02:00

11 lines
400 B
JavaScript

import { registerUnbound } from "discourse-common/lib/helpers";
import getUrl from "discourse-common/lib/get-url";
import deprecated from "discourse-common/lib/deprecated";
registerUnbound("get-url", (value) => getUrl(value));
registerUnbound("base-url", () => {
deprecated("Use `{{base-path}}` instead of `{{base-url}}`");
return getUrl("");
});
registerUnbound("base-path", () => getUrl(""));