diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 10:42:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch) | |
tree | baf29753ac5d4598643e3bee719f8df0cc36c59d /shared/extra-utils/server | |
parent | 08642a765ea514a00f159db898edf14c376fbe6c (diff) | |
download | PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip |
Refactor requests
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/config-command.ts | 4 | ||||
-rw-r--r-- | shared/extra-utils/server/contact-form-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/debug-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/follows-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/jobs-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/plugins-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/redundancy-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/server.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/servers-command.ts | 2 | ||||
-rw-r--r-- | shared/extra-utils/server/stats-command.ts | 2 |
10 files changed, 11 insertions, 11 deletions
diff --git a/shared/extra-utils/server/config-command.ts b/shared/extra-utils/server/config-command.ts index f5d7fc5e3..6e875fdf6 100644 --- a/shared/extra-utils/server/config-command.ts +++ b/shared/extra-utils/server/config-command.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { merge } from 'lodash' | 1 | import { merge } from 'lodash' |
2 | import { DeepPartial, HttpStatusCode } from '@shared/core-utils' | 2 | import { DeepPartial } from '@shared/core-utils' |
3 | import { About, ServerConfig } from '@shared/models' | 3 | import { About, ServerConfig, HttpStatusCode } from '@shared/models' |
4 | import { CustomConfig } from '../../models/server/custom-config.model' | 4 | import { CustomConfig } from '../../models/server/custom-config.model' |
5 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 5 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
6 | 6 | ||
diff --git a/shared/extra-utils/server/contact-form-command.ts b/shared/extra-utils/server/contact-form-command.ts index 8d034552b..0e8fd6d84 100644 --- a/shared/extra-utils/server/contact-form-command.ts +++ b/shared/extra-utils/server/contact-form-command.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 1 | import { HttpStatusCode } from '@shared/models' |
2 | import { ContactForm } from '../../models/server' | 2 | import { ContactForm } from '../../models/server' |
3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
4 | 4 | ||
diff --git a/shared/extra-utils/server/debug-command.ts b/shared/extra-utils/server/debug-command.ts index 8b24b3067..36704836d 100644 --- a/shared/extra-utils/server/debug-command.ts +++ b/shared/extra-utils/server/debug-command.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Debug, SendDebugCommand } from '@shared/models' | 1 | import { Debug, SendDebugCommand } from '@shared/models' |
2 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 2 | import { HttpStatusCode } from '@shared/models' |
3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
4 | 4 | ||
5 | export class DebugCommand extends AbstractCommand { | 5 | export class DebugCommand extends AbstractCommand { |
diff --git a/shared/extra-utils/server/follows-command.ts b/shared/extra-utils/server/follows-command.ts index 4e9ed9494..694f5ea24 100644 --- a/shared/extra-utils/server/follows-command.ts +++ b/shared/extra-utils/server/follows-command.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { pick } from 'lodash' | 1 | import { pick } from 'lodash' |
2 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models' | 2 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models' |
3 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 3 | import { HttpStatusCode } from '@shared/models' |
4 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 4 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
5 | import { PeerTubeServer } from './server' | 5 | import { PeerTubeServer } from './server' |
6 | 6 | ||
diff --git a/shared/extra-utils/server/jobs-command.ts b/shared/extra-utils/server/jobs-command.ts index 392b868c1..09a299e5b 100644 --- a/shared/extra-utils/server/jobs-command.ts +++ b/shared/extra-utils/server/jobs-command.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { pick } from 'lodash' | 1 | import { pick } from 'lodash' |
2 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 2 | import { HttpStatusCode } from '@shared/models' |
3 | import { Job, JobState, JobType, ResultList } from '../../models' | 3 | import { Job, JobState, JobType, ResultList } from '../../models' |
4 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 4 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
5 | 5 | ||
diff --git a/shared/extra-utils/server/plugins-command.ts b/shared/extra-utils/server/plugins-command.ts index 98049ce19..59bc79b3d 100644 --- a/shared/extra-utils/server/plugins-command.ts +++ b/shared/extra-utils/server/plugins-command.ts | |||
@@ -3,7 +3,7 @@ | |||
3 | import { readJSON, writeJSON } from 'fs-extra' | 3 | import { readJSON, writeJSON } from 'fs-extra' |
4 | import { join } from 'path' | 4 | import { join } from 'path' |
5 | import { root } from '@server/helpers/core-utils' | 5 | import { root } from '@server/helpers/core-utils' |
6 | import { HttpStatusCode } from '@shared/core-utils' | 6 | import { HttpStatusCode } from '@shared/models' |
7 | import { | 7 | import { |
8 | PeerTubePlugin, | 8 | PeerTubePlugin, |
9 | PeerTubePluginIndex, | 9 | PeerTubePluginIndex, |
diff --git a/shared/extra-utils/server/redundancy-command.ts b/shared/extra-utils/server/redundancy-command.ts index 728332fdd..137d7f01c 100644 --- a/shared/extra-utils/server/redundancy-command.ts +++ b/shared/extra-utils/server/redundancy-command.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ResultList, VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | 1 | import { ResultList, VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' |
2 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 2 | import { HttpStatusCode } from '@shared/models' |
3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
4 | 4 | ||
5 | export class RedundancyCommand extends AbstractCommand { | 5 | export class RedundancyCommand extends AbstractCommand { |
diff --git a/shared/extra-utils/server/server.ts b/shared/extra-utils/server/server.ts index cc6df2efe..b33bb9d1e 100644 --- a/shared/extra-utils/server/server.ts +++ b/shared/extra-utils/server/server.ts | |||
@@ -254,7 +254,7 @@ export class PeerTubeServer { | |||
254 | 254 | ||
255 | process.on('exit', () => { | 255 | process.on('exit', () => { |
256 | try { | 256 | try { |
257 | process.kill(self.server.app.pid) | 257 | process.kill(self.app.pid) |
258 | } catch { /* empty */ } | 258 | } catch { /* empty */ } |
259 | }) | 259 | }) |
260 | 260 | ||
diff --git a/shared/extra-utils/server/servers-command.ts b/shared/extra-utils/server/servers-command.ts index 1a7b2aade..107e2b4ad 100644 --- a/shared/extra-utils/server/servers-command.ts +++ b/shared/extra-utils/server/servers-command.ts | |||
@@ -2,7 +2,7 @@ import { exec } from 'child_process' | |||
2 | import { copy, ensureDir, readFile, remove } from 'fs-extra' | 2 | import { copy, ensureDir, readFile, remove } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { root } from '@server/helpers/core-utils' | 4 | import { root } from '@server/helpers/core-utils' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/models' |
6 | import { getFileSize } from '@uploadx/core' | 6 | import { getFileSize } from '@uploadx/core' |
7 | import { isGithubCI, wait } from '../miscs' | 7 | import { isGithubCI, wait } from '../miscs' |
8 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 8 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
diff --git a/shared/extra-utils/server/stats-command.ts b/shared/extra-utils/server/stats-command.ts index f0f02ca08..6db473588 100644 --- a/shared/extra-utils/server/stats-command.ts +++ b/shared/extra-utils/server/stats-command.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ServerStats } from '@shared/models' | 1 | import { ServerStats } from '@shared/models' |
2 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | 2 | import { HttpStatusCode } from '@shared/models' |
3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 3 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
4 | 4 | ||
5 | export class StatsCommand extends AbstractCommand { | 5 | export class StatsCommand extends AbstractCommand { |