backend rewritten in rust #11

Merged
mixel merged 9 commits from new-backend into main 2024-10-04 17:28:26 +02:00
2 changed files with 5 additions and 0 deletions
Showing only changes of commit b2c1e2e744 - Show all commits

View file

@ -42,6 +42,7 @@ public class User implements UserDetails {
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;
// TODO: I think this can be removed since the same logic is already done by @CreationTimestamp annotation
@PrePersist
protected void onCreate() {
createdAt = LocalDateTime.now();

View file

@ -2,7 +2,11 @@ package com.mixel.docusphere.repository;
import com.mixel.docusphere.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;
import java.util.UUID;
public interface UserRepository extends JpaRepository<User, UUID> {
Optional<User> findByEmail(String email);
}