mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
get credentials from settings on lesson update
This commit is contained in:
@@ -560,7 +560,10 @@ public class EduStepicConnector {
|
||||
public static int updateLesson(Project project, @NotNull final Lesson lesson, ProgressIndicator indicator) {
|
||||
final HttpPut request = new HttpPut(stepicApiUrl + "lessons/" + String.valueOf(lesson.id));
|
||||
if (ourClient == null) {
|
||||
showLoginDialog();
|
||||
if (!login()) {
|
||||
LOG.error("Failed to push lesson");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
setHeaders(request, "application/json");
|
||||
@@ -596,7 +599,7 @@ public class EduStepicConnector {
|
||||
public static int postLesson(Project project, @NotNull final Lesson lesson, ProgressIndicator indicator) {
|
||||
final HttpPost request = new HttpPost(stepicApiUrl + "lessons");
|
||||
if (ourClient == null) {
|
||||
showLoginDialog();
|
||||
login();
|
||||
}
|
||||
|
||||
setHeaders(request, "application/json");
|
||||
|
||||
Reference in New Issue
Block a user