style
This commit is contained in:
parent
40d7dc0ca6
commit
71603e6ccd
|
@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private httpRequestService: HttpRequestService,
|
private httpRequestService: HttpRequestService,
|
||||||
private roleService: RoleService,
|
private roleService: RoleService,
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const policies = await this.roleService.getUserPolicies(me.id);
|
const policies = await this.roleService.getUserPolicies(me.id);
|
||||||
if (!policies.canUseTTS) {
|
if (!policies.canUseTTS) {
|
||||||
|
@ -161,7 +161,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
const contentType = res.headers.get('Content-Type') || 'application/octet-stream';
|
const contentType = res.headers.get('Content-Type') || 'application/octet-stream';
|
||||||
|
|
||||||
if (contentType === 'audio/x-wav') {
|
if (contentType === 'audio/x-wav') {
|
||||||
// @ts-ignore
|
|
||||||
return res.body;
|
return res.body;
|
||||||
} else {
|
} else {
|
||||||
throw new ApiError(meta.errors.unavailable);
|
throw new ApiError(meta.errors.unavailable);
|
||||||
|
@ -188,7 +187,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
const contentType = res.headers.get('Content-Type') || 'application/octet-stream';
|
const contentType = res.headers.get('Content-Type') || 'application/octet-stream';
|
||||||
|
|
||||||
if (contentType === 'audio/flac') {
|
if (contentType === 'audio/flac') {
|
||||||
// @ts-ignore
|
|
||||||
return res.body;
|
return res.body;
|
||||||
} else {
|
} else {
|
||||||
throw new ApiError(meta.errors.unavailable);
|
throw new ApiError(meta.errors.unavailable);
|
||||||
|
|
Loading…
Reference in New Issue