@ -7,6 +7,7 @@ import com.plannaplan.repositories.AppConfigRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -62,4 +63,14 @@ public class ConfiguratorService {
|
||||
|
||||
return repsonse.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param inputStream This input stream contains new courses to import.
|
||||
*/
|
||||
public void importCoursesStream(InputStream inputStream) {
|
||||
FileReader reader = new FileReader(inputStream);
|
||||
FileData coursesData = reader.read();
|
||||
migrator.migrate(coursesData);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user