mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 11:03:50 +00:00
Migrated to TS first component where some dependency was being injected
This commit is contained in:
@@ -6,7 +6,7 @@ const CSV_MIME_TYPE = 'text/csv';
|
||||
export default class ServersImporter {
|
||||
public constructor(private readonly csvjson: CsvJson, private readonly fileReaderFactory: () => FileReader) {}
|
||||
|
||||
public importServersFromFile = async (file?: File): Promise<RegularServer[]> => {
|
||||
public importServersFromFile = async (file?: File | null): Promise<RegularServer[]> => {
|
||||
if (!file || file.type !== CSV_MIME_TYPE) {
|
||||
throw new Error('No file provided or file is not a CSV');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user