feat: 🎸 Use new path for grants schema (#3309)
This commit is contained in:
1 parent
2709c2e081
commit
048339982e
5 files changed
+5
-5
No files matched your search
@@ -211,7 +211,7 @@ function routes() {
|
|||||||
return metadata;
|
return metadata;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.get('/grants-schema.json', () => {
|
this.get('/internal/grants-schema.json', () => {
|
||||||
return grantsSchemaData;
|
return grantsSchemaData;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default class ScopesScopeRolesRoleEditGrantsRoute extends Route {
|
|||||||
@notifyError(({ message }) => message, { catch: true })
|
@notifyError(({ message }) => message, { catch: true })
|
||||||
async fetchGrantsSchema() {
|
async fetchGrantsSchema() {
|
||||||
const adapter = this.store.adapterFor('application');
|
const adapter = this.store.adapterFor('application');
|
||||||
const url = `${adapter.host ?? ''}/grants-schema.json`;
|
const url = `${adapter.host ?? ''}/internal/grants-schema.json`;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module('Integration | Component | grant-actions/index', function (hooks) {
|
|||||||
setupIntl(hooks, 'en-us');
|
setupIntl(hooks, 'en-us');
|
||||||
|
|
||||||
hooks.beforeEach(async function () {
|
hooks.beforeEach(async function () {
|
||||||
const response = await fetch('/grants-schema.json');
|
const response = await fetch('/internal/grants-schema.json');
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ module('Unit | Utils | grant-completions', function (hooks) {
|
|||||||
this.idLookup = async () => [];
|
this.idLookup = async () => [];
|
||||||
this.getIsLoading = () => false;
|
this.getIsLoading = () => false;
|
||||||
|
|
||||||
const response = await fetch('/grants-schema.json');
|
const response = await fetch('/internal/grants-schema.json');
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module('Unit | Utility | grant-linter', function (hooks) {
|
|||||||
setupIntl(hooks, 'en-us');
|
setupIntl(hooks, 'en-us');
|
||||||
|
|
||||||
hooks.beforeEach(async function () {
|
hooks.beforeEach(async function () {
|
||||||
const response = await fetch('/grants-schema.json');
|
const response = await fetch('/internal/grants-schema.json');
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
throw new Error(`Failed to fetch grants schema: ${response.status}`);
|
||||||
|
|||||||
Reference in new issue
Block a user