Olivier Massot 1 年之前
父節點
當前提交
3149bba16e
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 1
      .eslintrc.cjs
  2. 1 3
      services/data/entityManager.ts

+ 1 - 1
.eslintrc.cjs

@@ -19,7 +19,7 @@ module.exports = {
     'plugin:vue/vue3-recommended',
     'plugin:vue/vue3-recommended',
     'plugin:prettier/recommended',
     'plugin:prettier/recommended',
   ],
   ],
-  ignorePatterns: ['.nuxt', 'coverage/*', 'vendor/*', 'dist/*'],
+  ignorePatterns: ['.nuxt', 'coverage/*', 'vendor/*', 'dist/*', 'models/models.ts'],
   plugins: ['vue', '@typescript-eslint'],
   plugins: ['vue', '@typescript-eslint'],
   // add your custom rules here
   // add your custom rules here
   rules: {
   rules: {

+ 1 - 3
services/data/entityManager.ts

@@ -87,9 +87,7 @@ class EntityManager {
    *
    *
    * @param entityName
    * @param entityName
    */
    */
-  public async getModelFor(
-    entityName: string,
-  ): Promise<typeof ApiResource> {
+  public async getModelFor(entityName: string): Promise<typeof ApiResource> {
     if (!Object.prototype.hasOwnProperty.call(modelsIndex, entityName)) {
     if (!Object.prototype.hasOwnProperty.call(modelsIndex, entityName)) {
       throw new Error("No model found for entity name '" + entityName + "'")
       throw new Error("No model found for entity name '" + entityName + "'")
     }
     }