meilisearch-admin/app/routes/admin/indexes/item/documents/new.js
2022-11-13 08:17:06 +03:00

15 lines
502 B
JavaScript

import Route from '@ember/routing/route';
import Document from '../../../../../models/document';
import { hash } from 'rsvp';
export default class AdminIndexesItemDocumentsNewRoute extends Route {
templateName = 'admin.indexes.item.documents.document.edit';
controllerName = 'admin.indexes.item.documents.document.edit';
model() {
const index = this.modelFor('admin.indexes.item');
const document = new Document({ [index.primaryKey]: '' });
return hash({ index, document });
}
}