Compare commits
75 Commits
fa50282a62
...
renovate/t
Author | SHA1 | Date | |
---|---|---|---|
b009b9ba0c | |||
9f25e39cca | |||
0c178daf55 | |||
8dbc5c452e | |||
e5ee0b4d77 | |||
bc3bfe08c6 | |||
f2d391a430 | |||
764a7d94e3 | |||
aea6a64896 | |||
9c728f312b | |||
c7d4056dc3 | |||
555e72ef22 | |||
f35926dfb6 | |||
067ac5181b | |||
b83314f540 | |||
3203d12aac | |||
fae4e144f4 | |||
8179c7a6d6 | |||
a42b887a74 | |||
84ed2c6754 | |||
126920b41f | |||
24fa207005 | |||
40901c55db | |||
fd870317dd | |||
4f6d4abb43 | |||
94da037d55 | |||
88e8c9bf05 | |||
40bbfd9adf | |||
c803ccb212 | |||
db98ff4ed2 | |||
44c54112b6 | |||
cdcb86913f | |||
fcfe457514 | |||
55745f5845 | |||
2ee8bc337f | |||
e441480bf7 | |||
c84817d190 | |||
f615291950 | |||
b95aa90836 | |||
22d2bbfc41 | |||
069ca185cc | |||
9b8f2bd3cf | |||
6c9a0db8d5 | |||
877b0c56b3 | |||
25cae9b006 | |||
fdd11e7eae | |||
9bb93b72cc | |||
f82a788bb0 | |||
2e52958e64 | |||
18cf96d22c | |||
fc63a2935f | |||
c48807bf4b | |||
c896b2cc51 | |||
5a0e720952 | |||
8e2cd9824d | |||
aabec5f0b8 | |||
a763568f6e | |||
8cbf1c5d5d | |||
79c3d669e4 | |||
b68c6f9ee5 | |||
7bf50a8971 | |||
769baa49f1 | |||
1a706ee6a3 | |||
0e79202c77 | |||
4f75833414 | |||
ca6b5d398b | |||
c6e53d5790 | |||
646bf2c0aa | |||
ff95904360 | |||
46eb2c9534 | |||
74efe64282 | |||
2fbbe5a7b4 | |||
7429105374 | |||
dc9bde7ca0 | |||
8b567f9b22 |
@ -14,7 +14,7 @@ steps:
|
||||
- cargo test
|
||||
|
||||
- name: app_deploy
|
||||
image: node:22
|
||||
image: node:23
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
@ -24,7 +24,7 @@ steps:
|
||||
commands:
|
||||
# Build website
|
||||
- cd geneit_app
|
||||
- npm install
|
||||
- npm install
|
||||
- GENERATE_SOURCEMAP=false npm run build
|
||||
# Install AWS
|
||||
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
|
28
geneit_app/eslint.config.js
Normal file
28
geneit_app/eslint.config.js
Normal file
@ -0,0 +1,28 @@
|
||||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
plugins: {
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
3354
geneit_app/package-lock.json
generated
3354
geneit_app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,70 +3,54 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@fullcalendar/core": "^6.1.15",
|
||||
"@fullcalendar/daygrid": "^6.1.15",
|
||||
"@fullcalendar/interaction": "^6.1.15",
|
||||
"@fullcalendar/list": "^6.1.15",
|
||||
"@fullcalendar/react": "^6.1.15",
|
||||
"@mdi/js": "^7.2.96",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/roboto": "^5.2.6",
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/interaction": "^6.1.17",
|
||||
"@fullcalendar/list": "^6.1.17",
|
||||
"@fullcalendar/react": "^6.1.17",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/react": "^1.6.1",
|
||||
"@mui/icons-material": "^6.1.2",
|
||||
"@mui/lab": "^6.0.0-beta.10",
|
||||
"@mui/material": "^6.1.2",
|
||||
"@mui/x-data-grid": "^7.18.0",
|
||||
"@mui/x-date-pickers": "^7.18.0",
|
||||
"@mui/x-tree-view": "^7.18.0",
|
||||
"@testing-library/jest-dom": "^6.5.0",
|
||||
"@testing-library/react": "^16.0.1",
|
||||
"@testing-library/user-event": "^14.0.0",
|
||||
"@types/jest": "^29.5.13",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.2",
|
||||
"@mui/icons-material": "^7.0.2",
|
||||
"@mui/lab": "^7.0.0-beta.13",
|
||||
"@mui/material": "^7.0.2",
|
||||
"@mui/x-data-grid": "^7.29.6",
|
||||
"@mui/x-date-pickers": "^7.29.4",
|
||||
"@mui/x-tree-view": "^7.29.1",
|
||||
"date-and-time": "^3.6.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"email-validator": "^2.0.4",
|
||||
"filesize": "^10.1.6",
|
||||
"jspdf": "^2.5.2",
|
||||
"mui-color-input": "^5.0.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-easy-crop": "^5.0.8",
|
||||
"react-qr-code": "^2.0.14",
|
||||
"react-router-dom": "^7.0.0",
|
||||
"react-zoom-pan-pinch": "^3.4.4",
|
||||
"svg2pdf.js": "^2.2.3",
|
||||
"typescript": "^5.6.2",
|
||||
"vite": "^6.0.0",
|
||||
"vite-tsconfig-paths": "^5.0.1",
|
||||
"web-vitals": "^3.5.2"
|
||||
"jspdf": "^3.0.1",
|
||||
"mui-color-input": "^7.0.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-easy-crop": "^5.4.2",
|
||||
"react-qr-code": "^2.0.16",
|
||||
"react-router-dom": "^7.4.0",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"svg2pdf.js": "^2.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.28.0",
|
||||
"@types/react": "^19.0.12",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.0.0",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.34.1",
|
||||
"vite": "^6.2.3"
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,10 @@ export function App(): React.ReactElement {
|
||||
|
||||
const context: AuthContext = {
|
||||
signedIn: signedIn,
|
||||
setSignedIn: (s) => setSignedIn(s),
|
||||
setSignedIn: (s) => {
|
||||
location.reload();
|
||||
setSignedIn(s);
|
||||
},
|
||||
};
|
||||
|
||||
const router = createBrowserRouter(
|
||||
|
@ -3,7 +3,6 @@ import ReactDOM from "react-dom/client";
|
||||
import { App } from "./App";
|
||||
import { ServerApi } from "./api/ServerApi";
|
||||
import "./index.css";
|
||||
import reportWebVitals from "./reportWebVitals";
|
||||
|
||||
// Roboto font
|
||||
import "@fontsource/roboto/300.css";
|
||||
@ -61,8 +60,3 @@ async function init() {
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
// If you want to start measuring performance in your app, pass a function
|
||||
// to log results (for example: reportWebVitals(console.log))
|
||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||
reportWebVitals();
|
||||
|
@ -1,15 +0,0 @@
|
||||
import { ReportHandler } from 'web-vitals';
|
||||
|
||||
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||
getCLS(onPerfEntry);
|
||||
getFID(onPerfEntry);
|
||||
getFCP(onPerfEntry);
|
||||
getLCP(onPerfEntry);
|
||||
getTTFB(onPerfEntry);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default reportWebVitals;
|
@ -1,4 +1,5 @@
|
||||
import { Visibility, VisibilityOff } from "@mui/icons-material";
|
||||
import VisibilityIcon from "@mui/icons-material/Visibility";
|
||||
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
||||
import {
|
||||
Alert,
|
||||
CircularProgress,
|
||||
@ -11,7 +12,7 @@ import {
|
||||
} from "@mui/material";
|
||||
import Box from "@mui/material/Box";
|
||||
import Button from "@mui/material/Button";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import * as React from "react";
|
||||
@ -148,7 +149,7 @@ export function LoginRoute(): React.ReactElement {
|
||||
onMouseDown={handleMouseDownPassword}
|
||||
edge="end"
|
||||
>
|
||||
{showPassword ? <VisibilityOff /> : <Visibility />}
|
||||
{showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</InputAdornment>
|
||||
|
@ -4,7 +4,7 @@ import EditIcon from "@mui/icons-material/Edit";
|
||||
import FileDownloadIcon from "@mui/icons-material/FileDownload";
|
||||
import SaveIcon from "@mui/icons-material/Save";
|
||||
import { Button, Stack } from "@mui/material";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import React from "react";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { ServerApi } from "../../../api/ServerApi";
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { useFamily } from "../../../widgets/BaseFamilyRoute";
|
||||
import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle";
|
||||
|
||||
export function FamilyHomeRoute(): React.ReactElement {
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
ListItemText,
|
||||
Stack,
|
||||
} from "@mui/material";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import * as EmailValidator from "email-validator";
|
||||
import React from "react";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
|
@ -1,5 +0,0 @@
|
||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||
// allows you to do things like:
|
||||
// expect(element).toHaveTextContent(/react/i)
|
||||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom';
|
@ -43,9 +43,13 @@ export function BaseAuthenticatedPage(): React.ReactElement {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
const signOut = () => {
|
||||
const signOut = async () => {
|
||||
handleCloseMenu();
|
||||
AuthApi.SignOut();
|
||||
try {
|
||||
await AuthApi.SignOut();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
navigate("/");
|
||||
auth.setSignedIn(false);
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ export function BaseFamilyRoute(): React.ReactElement {
|
||||
|
||||
const loadKey = React.useRef(1);
|
||||
|
||||
const loadPromise = React.useRef<() => void>();
|
||||
const loadPromise = React.useRef<() => void>(null);
|
||||
|
||||
const load = async () => {
|
||||
const familyID = Number(familyId);
|
||||
@ -104,7 +104,7 @@ export function BaseFamilyRoute(): React.ReactElement {
|
||||
build={() => {
|
||||
if (loadPromise.current != null) {
|
||||
loadPromise.current?.();
|
||||
loadPromise.current = undefined;
|
||||
loadPromise.current = null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -3,10 +3,9 @@ import Icon from "@mdi/react";
|
||||
import Avatar from "@mui/material/Avatar";
|
||||
import Box from "@mui/material/Box";
|
||||
import CssBaseline from "@mui/material/CssBaseline";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import * as React from "react";
|
||||
import { Link, Outlet } from "react-router-dom";
|
||||
import { DarkThemeButton } from "./DarkThemeButton";
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Visibility, VisibilityOff } from "@mui/icons-material";
|
||||
import VisibilityIcon from "@mui/icons-material/Visibility";
|
||||
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
||||
import {
|
||||
FormControl,
|
||||
FormHelperText,
|
||||
@ -50,7 +51,7 @@ export function PasswordInput(p: {
|
||||
onMouseDown={handleMouseDownPassword}
|
||||
edge="end"
|
||||
>
|
||||
{showPassword ? <VisibilityOff /> : <Visibility />}
|
||||
{showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
|
||||
</IconButton>
|
||||
</InputAdornment>
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export function BaseAccommodationsRoute(): React.ReactElement {
|
||||
|
||||
const loadKey = React.useRef(1);
|
||||
|
||||
const loadPromise = React.useRef<() => void>();
|
||||
const loadPromise = React.useRef<() => void>(null);
|
||||
|
||||
const load = async () => {
|
||||
setAccommodations(
|
||||
@ -53,7 +53,7 @@ export function BaseAccommodationsRoute(): React.ReactElement {
|
||||
build={() => {
|
||||
if (loadPromise.current != null) {
|
||||
loadPromise.current?.();
|
||||
loadPromise.current = undefined;
|
||||
loadPromise.current = null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -22,7 +22,7 @@ export function BaseGenealogyRoute(): React.ReactElement {
|
||||
|
||||
const loadKey = React.useRef(1);
|
||||
|
||||
const loadPromise = React.useRef<() => void>();
|
||||
const loadPromise = React.useRef<() => void>(null);
|
||||
|
||||
const load = async () => {
|
||||
setMembers(await MemberApi.GetEntireList(family.familyId));
|
||||
@ -48,7 +48,7 @@ export function BaseGenealogyRoute(): React.ReactElement {
|
||||
build={() => {
|
||||
if (loadPromise.current != null) {
|
||||
loadPromise.current?.();
|
||||
loadPromise.current = undefined;
|
||||
loadPromise.current = null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
26
geneit_app/tsconfig.app.json
Normal file
26
geneit_app/tsconfig.app.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
@ -1,21 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"types": ["vite/client"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": ["src"]
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
|
24
geneit_app/tsconfig.node.json
Normal file
24
geneit_app/tsconfig.node.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
@ -1,15 +1,7 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import viteTsconfigPaths from "vite-tsconfig-paths";
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
// depending on your application, base can also be "/"
|
||||
base: "/",
|
||||
plugins: [react(), viteTsconfigPaths()],
|
||||
server: {
|
||||
// this ensures that the browser opens upon server start
|
||||
open: true,
|
||||
// this sets a default port to 3000
|
||||
port: 3000,
|
||||
},
|
||||
});
|
||||
plugins: [react()],
|
||||
})
|
||||
|
1362
geneit_backend/Cargo.lock
generated
1362
geneit_backend/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,43 +1,43 @@
|
||||
[package]
|
||||
name = "geneit_backend"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.21"
|
||||
env_logger = "0.11.5"
|
||||
clap = { version = "4.5.17", features = ["derive", "env"] }
|
||||
log = "0.4.27"
|
||||
env_logger = "0.11.8"
|
||||
clap = { version = "4.5.40", features = ["derive", "env"] }
|
||||
lazy_static = "1.5.0"
|
||||
lazy-regex = "3.3.0"
|
||||
anyhow = "1.0.87"
|
||||
actix-web = "4.9.0"
|
||||
actix-cors = "0.7.0"
|
||||
actix-multipart = "0.7.0"
|
||||
lazy-regex = "3.4.1"
|
||||
anyhow = "1.0.98"
|
||||
actix-web = "4.10.2"
|
||||
actix-cors = "0.7.1"
|
||||
actix-multipart = "0.7.2"
|
||||
actix-remote-ip = "0.1.0"
|
||||
futures-util = "0.3.30"
|
||||
diesel = { version = "2.2.4", features = ["postgres"] }
|
||||
diesel_migrations = "2.1.0"
|
||||
serde = { version = "1.0.210", features = ["derive"] }
|
||||
serde_json = "1.0.128"
|
||||
mailchecker = "6.0.8"
|
||||
redis = "0.27.0"
|
||||
lettre = "0.11.8"
|
||||
rand = "0.8.5"
|
||||
bcrypt = "0.16.0"
|
||||
light-openid = "1.0.2"
|
||||
thiserror = "1.0.60"
|
||||
serde_with = "3.8.1"
|
||||
rust_iso3166 = "0.1.12"
|
||||
futures-util = "0.3.31"
|
||||
diesel = { version = "2.2.11", features = ["postgres"] }
|
||||
diesel_migrations = "2.2.0"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
mailchecker = "6.0.17"
|
||||
redis = "0.29.5"
|
||||
lettre = "0.11.17"
|
||||
rand = "0.9.1"
|
||||
bcrypt = "0.17.0"
|
||||
light-openid = "1.0.4"
|
||||
thiserror = "2.0.12"
|
||||
serde_with = "3.12.0"
|
||||
rust_iso3166 = "0.1.14"
|
||||
rust-s3 = "0.35.1"
|
||||
sha2 = "0.10.8"
|
||||
image = "0.25.1"
|
||||
uuid = { version = "1.8.0", features = ["v4"] }
|
||||
sha2 = "0.10.9"
|
||||
image = "0.25.6"
|
||||
uuid = { version = "1.16.0", features = ["v4"] }
|
||||
httpdate = "1.0.3"
|
||||
zip = "2.2.0"
|
||||
mime_guess = "2.0.4"
|
||||
tempfile = "3.12.0"
|
||||
base64 = "0.22.0"
|
||||
zip = "2.5.0"
|
||||
mime_guess = "2.0.5"
|
||||
tempfile = "3.19.1"
|
||||
base64 = "0.22.1"
|
||||
ical = { version = "0.11.0", features = ["generator", "ical", "vcard"] }
|
||||
chrono = "0.4.38"
|
||||
chrono = "0.4.41"
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::app_config::AppConfig;
|
||||
use diesel::result::{DatabaseErrorKind, Error};
|
||||
use diesel::{Connection, PgConnection};
|
||||
use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness};
|
||||
use diesel_migrations::{EmbeddedMigrations, MigrationHarness, embed_migrations};
|
||||
use std::cell::RefCell;
|
||||
|
||||
const MIGRATIONS: EmbeddedMigrations = embed_migrations!();
|
||||
|
@ -4,7 +4,7 @@ use crate::extractors::accommodation_extractor::FamilyAndAccommodationInPath;
|
||||
use crate::extractors::family_extractor::{FamilyInPath, FamilyInPathWithAdminMembership};
|
||||
use crate::models::Accommodation;
|
||||
use crate::services::accommodations_list_service;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
enum AccommodationListControllerErr {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use ical::{generator::*, *};
|
||||
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_web::{HttpResponse, web};
|
||||
use chrono::DateTime;
|
||||
|
||||
use crate::constants::StaticConstraints;
|
||||
|
@ -5,7 +5,7 @@ use crate::extractors::family_extractor::FamilyInPath;
|
||||
use crate::models::{Accommodation, AccommodationReservationID, NewAccommodationReservation};
|
||||
use crate::services::accommodations_reservations_service;
|
||||
use crate::utils::time_utils::time;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
pub struct UpdateReservationQuery {
|
||||
|
@ -5,7 +5,7 @@ use crate::services::login_token_service::LoginTokenValue;
|
||||
use crate::services::rate_limiter_service::RatedAction;
|
||||
use crate::services::{login_token_service, openid_service, rate_limiter_service, users_service};
|
||||
use actix_remote_ip::RemoteIP;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
pub struct CreateAccountBody {
|
||||
|
@ -1,12 +1,12 @@
|
||||
use crate::controllers::members_controller::RequestDate;
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::controllers::members_controller::RequestDate;
|
||||
use crate::extractors::couple_extractor::FamilyAndCoupleInPath;
|
||||
use crate::extractors::family_extractor::FamilyInPath;
|
||||
use crate::models::{Couple, CoupleState, MemberID, PhotoID};
|
||||
use crate::services::{couples_service, members_service, photos_service};
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_multipart::form::MultipartForm;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
serde_with::with_prefix!(prefix_wedding "wedding_");
|
||||
serde_with::with_prefix!(prefix_divorce "divorce_");
|
||||
|
@ -1,14 +1,14 @@
|
||||
use crate::connections::s3_connection;
|
||||
use crate::constants;
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::controllers::couples_controller::CoupleRequest;
|
||||
use crate::controllers::members_controller::MemberRequest;
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::extractors::family_extractor::{FamilyInPath, FamilyInPathWithAdminMembership};
|
||||
use crate::models::{CoupleID, MemberID, PhotoID};
|
||||
use crate::services::photos_service::UploadedFile;
|
||||
use crate::services::{couples_service, members_service, photos_service};
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_multipart::form::MultipartForm;
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_web::HttpResponse;
|
||||
use mime_guess::Mime;
|
||||
use std::collections::HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::constants::{StaticConstraints, FAMILY_INVITATION_CODE_LEN};
|
||||
use crate::constants::{FAMILY_INVITATION_CODE_LEN, StaticConstraints};
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::extractors::family_extractor::{FamilyInPath, FamilyInPathWithAdminMembership};
|
||||
use crate::models::{FamilyMembership, UserID};
|
||||
@ -7,7 +7,7 @@ use crate::services::rate_limiter_service::RatedAction;
|
||||
use crate::services::{families_service, rate_limiter_service};
|
||||
use crate::utils::string_utils::rand_str;
|
||||
use actix_remote_ip::RemoteIP;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
pub struct CreateFamilyReq {
|
||||
|
@ -5,9 +5,9 @@ use crate::extractors::member_extractor::FamilyAndMemberInPath;
|
||||
use crate::models::{Member, MemberID, PhotoID, Sex};
|
||||
use crate::services::{members_service, photos_service};
|
||||
use crate::utils::countries_utils;
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_multipart::form::MultipartForm;
|
||||
use actix_web::{web, HttpResponse};
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use actix_web::{HttpResponse, web};
|
||||
|
||||
serde_with::with_prefix!(prefix_birth "birth_");
|
||||
serde_with::with_prefix!(prefix_death "death_");
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! # API controller
|
||||
|
||||
use actix_web::body::BoxBody;
|
||||
use actix_web::HttpResponse;
|
||||
use actix_web::body::BoxBody;
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use zip::result::ZipError;
|
||||
|
||||
|
@ -3,7 +3,7 @@ use crate::controllers::HttpResult;
|
||||
use crate::models::PhotoID;
|
||||
use crate::services::photos_service;
|
||||
use actix_web::http::header;
|
||||
use actix_web::{web, HttpRequest, HttpResponse};
|
||||
use actix_web::{HttpRequest, HttpResponse, web};
|
||||
use std::ops::Add;
|
||||
use std::time::{Duration, UNIX_EPOCH};
|
||||
|
||||
|
@ -9,8 +9,8 @@ use crate::services::login_token_service::LoginToken;
|
||||
use crate::services::rate_limiter_service::RatedAction;
|
||||
use crate::services::{rate_limiter_service, users_service};
|
||||
use actix_remote_ip::RemoteIP;
|
||||
use actix_web::web::Json;
|
||||
use actix_web::HttpResponse;
|
||||
use actix_web::web::Json;
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
struct UserAPI<'a> {
|
||||
|
@ -2,7 +2,7 @@ use actix_cors::Cors;
|
||||
use actix_multipart::form::tempfile::TempFileConfig;
|
||||
use actix_remote_ip::RemoteIPConfig;
|
||||
use actix_web::middleware::Logger;
|
||||
use actix_web::{web, App, HttpServer};
|
||||
use actix_web::{App, HttpServer, web};
|
||||
use geneit_backend::app_config::AppConfig;
|
||||
use geneit_backend::connections::{db_connection, s3_connection};
|
||||
use geneit_backend::controllers::{
|
||||
|
@ -9,7 +9,7 @@ use crate::utils::string_utils::rand_str;
|
||||
use crate::utils::time_utils::time;
|
||||
use actix_web::dev::Payload;
|
||||
use actix_web::{FromRequest, HttpRequest};
|
||||
use std::future::{ready, Ready};
|
||||
use std::future::{Ready, ready};
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
enum LoginTokenServiceError {
|
||||
|
@ -3,8 +3,8 @@ use crate::models::{FamilyID, Member, MemberID, NewMember};
|
||||
use crate::schema::members;
|
||||
use crate::services::{couples_service, photos_service};
|
||||
use crate::utils::time_utils::time;
|
||||
use diesel::prelude::*;
|
||||
use diesel::RunQueryDsl;
|
||||
use diesel::prelude::*;
|
||||
|
||||
/// Create a new family member
|
||||
pub async fn create(family_id: FamilyID) -> anyhow::Result<Member> {
|
||||
@ -188,7 +188,10 @@ pub mod loop_detection {
|
||||
let member = match members.get(&curr_stack.curr) {
|
||||
Some(m) => m,
|
||||
None => {
|
||||
log::warn!("Member {:?} not found in the tree for loop detection, this should never happen!", curr_stack.curr);
|
||||
log::warn!(
|
||||
"Member {:?} not found in the tree for loop detection, this should never happen!",
|
||||
curr_stack.curr
|
||||
);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@ -6,8 +6,8 @@ use crate::utils::crypt_utils::sha512;
|
||||
use crate::utils::time_utils::time;
|
||||
use actix_multipart::form::tempfile::TempFile;
|
||||
use diesel::prelude::*;
|
||||
use image::imageops::FilterType;
|
||||
use image::ImageFormat;
|
||||
use image::imageops::FilterType;
|
||||
use mime_guess::Mime;
|
||||
use std::fs::File;
|
||||
use std::io::{Cursor, Read, Seek, Write};
|
||||
|
@ -10,7 +10,6 @@ use crate::utils::string_utils::rand_str;
|
||||
use crate::utils::time_utils::time;
|
||||
use bcrypt::DEFAULT_COST;
|
||||
use diesel::prelude::*;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
/// Get the information of a user, by its id
|
||||
pub async fn get_by_id(id: UserID) -> anyhow::Result<User> {
|
||||
@ -25,8 +24,7 @@ pub async fn get_by_mail(mail: &str) -> anyhow::Result<User> {
|
||||
/// Get the information of a user, by its password reset token
|
||||
pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> {
|
||||
if token.is_empty() {
|
||||
return Err(anyhow::Error::from(std::io::Error::new(
|
||||
ErrorKind::Other,
|
||||
return Err(anyhow::Error::from(std::io::Error::other(
|
||||
"Token is empty!",
|
||||
)));
|
||||
}
|
||||
@ -46,8 +44,7 @@ pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> {
|
||||
/// Get the information of a user, by its account deletion token
|
||||
pub async fn get_by_account_delete_token(token: &str) -> anyhow::Result<User> {
|
||||
if token.is_empty() {
|
||||
return Err(anyhow::Error::from(std::io::Error::new(
|
||||
ErrorKind::Other,
|
||||
return Err(anyhow::Error::from(std::io::Error::other(
|
||||
"Token is empty!",
|
||||
)));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use base64::{engine::general_purpose, Engine as _};
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
|
||||
/// Encode a base64 string
|
||||
pub fn base64_enc<T: AsRef<[u8]>>(b: T) -> String {
|
||||
|
@ -1,11 +1,6 @@
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::Rng;
|
||||
use rand::distr::{Alphanumeric, SampleString};
|
||||
|
||||
/// Generate a random string of a given size
|
||||
/// Generate a random string of a given length
|
||||
pub fn rand_str(len: usize) -> String {
|
||||
rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.map(char::from)
|
||||
.take(len)
|
||||
.collect()
|
||||
Alphanumeric.sample_string(&mut rand::rng(), len)
|
||||
}
|
||||
|
@ -1,9 +1,3 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
"extends": ["local>renovate/presets"]
|
||||
}
|
Reference in New Issue
Block a user