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/users/users.ts | |
parent | 08642a765ea514a00f159db898edf14c376fbe6c (diff) | |
download | PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip |
Refactor requests
Diffstat (limited to 'shared/extra-utils/users/users.ts')
-rw-r--r-- | shared/extra-utils/users/users.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts deleted file mode 100644 index 6cf61d60e..000000000 --- a/shared/extra-utils/users/users.ts +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | import * as request from 'supertest' | ||
2 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
3 | |||
4 | // FIXME: delete once videos does not use it anymore | ||
5 | function xxxgetMyUserInformation (url: string, accessToken: string, specialStatus = HttpStatusCode.OK_200) { | ||
6 | const path = '/api/v1/users/me' | ||
7 | |||
8 | return request(url) | ||
9 | .get(path) | ||
10 | .set('Accept', 'application/json') | ||
11 | .set('Authorization', 'Bearer ' + accessToken) | ||
12 | .expect(specialStatus) | ||
13 | .expect('Content-Type', /json/) | ||
14 | } | ||
15 | |||
16 | // --------------------------------------------------------------------------- | ||
17 | |||
18 | export { | ||
19 | xxxgetMyUserInformation | ||
20 | } | ||