]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/plugins-command.ts
Refactor requests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / plugins-command.ts
index ff49d58c49557568fbdf2ba988fbb31fa6ba0e60..59bc79b3d2c062de7e21e3d4d655b8e7b57c1311 100644 (file)
@@ -3,7 +3,7 @@
 import { readJSON, writeJSON } from 'fs-extra'
 import { join } from 'path'
 import { root } from '@server/helpers/core-utils'
-import { HttpStatusCode } from '@shared/core-utils'
+import { HttpStatusCode } from '@shared/models'
 import {
   PeerTubePlugin,
   PeerTubePluginIndex,
@@ -15,7 +15,6 @@ import {
   RegisteredServerSettings,
   ResultList
 } from '@shared/models'
-import { buildServerDirectory } from '../miscs'
 import { AbstractCommand, OverrideCommandOptions } from '../shared'
 
 export class PluginsCommand extends AbstractCommand {
@@ -252,6 +251,6 @@ export class PluginsCommand extends AbstractCommand {
   }
 
   private getPackageJSONPath (npmName: string) {
-    return buildServerDirectory(this.server, join('plugins', 'node_modules', npmName, 'package.json'))
+    return this.server.servers.buildDirectory(join('plugins', 'node_modules', npmName, 'package.json'))
   }
 }