Compare commits

..

No commits in common. "1777e894e9d979206772f73b4bb28fc46a4bc136" and "e05492f4a85d7fc0481335b8b219f73ee318c77c" have entirely different histories.

11 changed files with 26 additions and 42 deletions

View File

@ -41,4 +41,3 @@ tasks.register("run") {
tasks.withType<Test> {
useJUnitPlatform()
}

View File

@ -1,14 +1,20 @@
package ovh.herisson.Clyde.EndPoints;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import ovh.herisson.Clyde.Repositories.TokenRepository;
import ovh.herisson.Clyde.Repositories.UserRepository;
import ovh.herisson.Clyde.Services.TokenService;
import ovh.herisson.Clyde.Tables.*;
import ovh.herisson.Clyde.Tables.Role;
import ovh.herisson.Clyde.Tables.Token;
import ovh.herisson.Clyde.Tables.User;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
@RestController
@ -20,7 +26,6 @@ public class MockController {
public final UserRepository userRepo;
public final TokenRepository tokenRepo;
public final TokenService tokenService;
ArrayList<User> mockUsers;
@ -57,4 +62,3 @@ public class MockController {
userRepo.deleteAll(mockUsers);
}
}

View File

@ -1,13 +1,13 @@
package ovh.herisson.Clyde.Services;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import ovh.herisson.Clyde.Repositories.FileRepository;
import ovh.herisson.Clyde.Tables.*;
import java.io.File;
import ovh.herisson.Clyde.Tables.FileType;
import ovh.herisson.Clyde.Tables.StorageFile;
import java.io.IOException;
import org.springframework.core.io.Resource;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@ -53,12 +53,4 @@ public class StorageService {
return url;
}
public void delete(StorageFile file) throws SecurityException {
File f = new File(file.getUrl());
f.delete();
//Delete l'entité
fileRepo.delete(file);
}
}

View File

@ -4,10 +4,7 @@ import jakarta.persistence.*;
import java.util.Date;
@Entity
public class InscriptionRequest {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private String firstName;

View File

@ -20,7 +20,7 @@ public class ReinscriptionRequest {
//Permet de différencier les demandes de changement et une réinscription dans le même cursus
//Pour la réinscription on va le mettre a 0
private boolean type = false;
private boolean type;
public ReinscriptionRequest(){}
@ -31,12 +31,6 @@ public class ReinscriptionRequest {
this.type = type;
}
public ReinscriptionRequest(User user, Cursus newCursus, RequestState state){
this.user = user;
this.newCursus = newCursus;
this.state = state;
}
public int getId() {
return id;
}

View File

@ -1,6 +1,9 @@
package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
@ -16,6 +19,7 @@ public class StorageFile {
private FileType fileType;
public StorageFile(String name, String url, FileType fileType){
this.name = name;
this.url = url;
@ -56,5 +60,4 @@ public class StorageFile {
public void setFileType(FileType fileType) {
this.fileType = fileType;
}
}

View File

@ -3,7 +3,7 @@ login.guest.register=Register
login.guest.alregister=Already Registered
login.guest.welcome=WELCOME TO THE UNIVERSITY
login.guest.email=E-MAIL
login.guest.firstname=FIRSTNAME
login.guest.firstname= FIRSTNAME
login.guest.surname=SURNAME
login.guest.country=COUNTRY
login.guest.address=ADDRESS
@ -13,7 +13,7 @@ login.guest.lastpage=Last Page
login.guest.submit=Submit
login.guest.birthday=BIRTHDAY
login.guest.confirm=CONFIRM
login.cPassword=Confirm Password
login.cPassword= Confirm Password
login.password=Password
app.home=Home
app.login=Login

View File

@ -3,11 +3,11 @@ login.guest.register=S'enregistrer
login.guest.alregister=Déjà Enregistré
login.guest.welcome=BIENVENUE A L'UNIVERSITE
login.guest.email=E-MAIL
login.guest.firstname=PRENOM
login.guest.surname=NOM
login.guest.country=PAYS
login.guest.firstname= PRENOM
login.guest.surname= NOM
login.guest.country= PAYS
login.guest.address=ADRESSE
login.guest.password=MOT DE PASSE
login.guest.password= MOT DE PASSE
login.guest.nextpage=Prochaine Page
login.guest.lastpage=Derniere Page
login.guest.submit=Envoyer

View File

@ -41,7 +41,7 @@
<ul class="horizontal">
<li title=home>
<a class="icon" href="#home">
<img class="clyde" src="./assets/Clyde.png" style="width: 40px; height: auto; margin-top:4px">
<img @click="draw" src="./assets/Clyde.png" style="width: 40px; height: auto; margin-top:4px">
</a></li>
<li title=home>
<a class="icon" href="#home">
@ -267,9 +267,5 @@
transition-duration: .3s;
padding-left: 15px;
}
.clyde:hover{
content: url("./assets/angry_clyde.png")
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -41,8 +41,7 @@ async function _rest(endPoint, config){
pending: config['pending'] != null ? config['pending'] : 'pending',
error: config['error'] != null ? config['error'] : 'Network Failure...',
success: config['success'] != null ? config['success'] : {render(res){
console.log(res);
return res.data.ok ? "Success" : "error";
return res.ok ? "Success" : "error";
}},
})
.then( e => e.json()).catch( e => e );