mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Refactors, bugfixing
This commit is contained in:
parent
5812618170
commit
e26d604a54
42 changed files with 370 additions and 376 deletions
|
|
@ -174,7 +174,6 @@ export class CliBuilder {
|
|||
// Split the command into parts and iterate over them
|
||||
for (const part of command.categories) {
|
||||
// If this part doesn't exist in the current level of the tree, add it (__proto__ check to prevent prototype pollution)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (!currentLevel[part] && part !== "__proto__") {
|
||||
// If this is the last part of the command, add the command itself
|
||||
if (
|
||||
|
|
@ -297,7 +296,6 @@ export class CliBuilder {
|
|||
type ExecuteFunction<T> = (
|
||||
instance: CliCommand,
|
||||
args: Partial<T>,
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
) => Promise<number> | Promise<void> | number | void;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -64,9 +64,7 @@ export class MediaBackend {
|
|||
* @returns The file as a File object
|
||||
*/
|
||||
public getFileByHash(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
file: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
databaseHashFetcher: (sha256: string) => Promise<string>,
|
||||
): Promise<File | null> {
|
||||
return Promise.reject(
|
||||
|
|
@ -79,7 +77,6 @@ export class MediaBackend {
|
|||
* @param filename File name
|
||||
* @returns The file as a File object
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public getFile(filename: string): Promise<File | null> {
|
||||
return Promise.reject(
|
||||
new Error("Do not call MediaBackend directly: use a subclass"),
|
||||
|
|
@ -91,7 +88,6 @@ export class MediaBackend {
|
|||
* @param file File to add
|
||||
* @returns Metadata about the uploaded file
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public addFile(file: File): Promise<UploadedFileMetadata> {
|
||||
return Promise.reject(
|
||||
new Error("Do not call MediaBackend directly: use a subclass"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue