discourse/app/assets/javascripts/discourse-common/addon/helpers/get-url.js
2020-12-01 15:31:26 -03:00

11 lines
400 B
JavaScript

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