Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions resources/view/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ <h3 class="mb-3">Sign in</h3>
<a class="btn btn-secondary btn-lg me-2" href="/oauth2/authorization/google"
type="button">
<i class="fa-brands fa-google"></i>
</a>
<a class="btn btn-primary btn-lg me-2" href="/oauth2/authorization/vk" style="padding-left: 17px; padding-right: 17px;"
type="button">
<i class="fa-brands fa-vk"></i>
</a>
<a class="btn btn-danger btn-lg me-2" href="/oauth2/authorization/yandex" style="padding-left: 21px; padding-right: 21px;"
type="button">
<i class="fa-brands fa-yandex"></i>
</a>
<a class="btn btn-dark btn-lg me-2" href="/oauth2/authorization/github" type="button">
<i class="fa-brands fa-github"></i>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ public static void upload(MultipartFile multipartFile, String directoryPath, Str
if (multipartFile.isEmpty()) {
throw new IllegalRequestDataException("Select a file to upload.");
}

File dir = new File(directoryPath);
if (dir.exists() || dir.mkdirs()) {
File file = new File(directoryPath + fileName);
try (OutputStream outStream = new FileOutputStream(file)) {
Path dirPath = Paths.get(directoryPath);
try {
if (!Files.exists(dirPath)) {
Files.createDirectories(dirPath);
}
Path filePath = dirPath.resolve(fileName);
try (OutputStream outStream = Files.newOutputStream(filePath)) {
outStream.write(multipartFile.getBytes());
} catch (IOException ex) {
throw new IllegalRequestDataException("Failed to upload file" + multipartFile.getOriginalFilename());
}
} catch (IOException e) {
throw new IllegalRequestDataException("Failed to upload file: " + multipartFile.getOriginalFilename());
}
}

Expand Down

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,6 @@ spring:
scope:
- email
- profile
vk:
client-id: 51562377
client-secret: jNM1YHQy1362Mqs49wUN
client-name: Vkontakte
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
client-authentication-method: client_secret_post
authorization-grant-type: authorization_code
scope: email
yandex:
client-id: 2f3395214ba84075956b76a34b231985
client-secret: ed236c501e444a609b0f419e5e88f1e1
client-name: Yandex
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
authorization-grant-type: authorization_code
gitlab:
client-id: b8520a3266089063c0d8261cce36971defa513f5ffd9f9b7a3d16728fc83a494
client-secret: e72c65320cf9d6495984a37b0f9cc03ec46be0bb6f071feaebbfe75168117004
Expand All @@ -83,16 +69,6 @@ spring:
authorization-grant-type: authorization_code
scope: read_user
provider:
vk:
authorization-uri: https://oauth.vk.com/authorize
token-uri: https://oauth.vk.com/access_token
user-info-uri: https://api.vk.com/method/users.get?v=8.1
user-name-attribute: response
yandex:
authorization-uri: https://oauth.yandex.ru/authorize
token-uri: https://oauth.yandex.ru/token
user-info-uri: https://login.yandex.ru/info
user-name-attribute: login
gitlab:
authorization-uri: https://gitlab.com/oauth/authorize
token-uri: https://gitlab.com/oauth/token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public static ProfileTo getUpdatedTo() {
new ContactTo("website", "new.com"),
new ContactTo("github", "newGitHub"),
new ContactTo("tg", "newTg"),
new ContactTo("vk", "newVk"),
new ContactTo("linkedin", "newLinkedin")));
}

Expand All @@ -57,7 +56,6 @@ public static Profile getUpdated(long id) {
new Contact(id, "website", "new.com"),
new Contact(id, "github", "newGitHub"),
new Contact(id, "tg", "newTg"),
new Contact(id, "vk", "newVk"),
new Contact(id, "linkedin", "newLinkedin")));
return profile;
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/resources/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ values (1, 'skype', 'userSkype'),
(1, 'mobile', '+01234567890'),
(1, 'website', 'user.com'),
(2, 'github', 'adminGitHub'),
(2, 'tg', 'adminTg'),
(2, 'vk', 'adminVk');
(2, 'tg', 'adminTg');


insert into PROJECT (code, title, description, type_code, parent_id)
Expand Down