Add CORS and authorized origins to server

This commit is contained in:
2023-01-04 14:42:55 +01:00
parent 57bc676ec1
commit a2a2863d62
5 changed files with 75 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
use super::super::schema::{langandagents, languages};
use diesel::prelude::*;
use super::super::schema::{languages, langandagents};
#[derive(diesel_derive_enum::DbEnum, Debug, Clone, PartialEq, Eq)]
#[DieselTypePath = "crate::db::schema::sql_types::Release"]
@@ -7,7 +7,7 @@ pub enum Release {
Public,
NonCommercial,
Research,
Private
Private,
}
#[derive(diesel_derive_enum::DbEnum, Debug, Clone, PartialEq, Eq)]
@@ -19,14 +19,14 @@ pub enum DictGenre {
Specialized,
Historical,
Orthography,
Terminology
Terminology,
}
#[derive(diesel_derive_enum::DbEnum, Debug, Clone, PartialEq, Eq)]
#[DieselTypePath = "crate::db::schema::sql_types::Agentlanguagerelation"]
pub enum AgentLanguageRelation {
Publisher,
Author
Author,
}
#[derive(Queryable, Insertable, Debug, Clone, PartialEq, Eq)]

View File

@@ -1,11 +1,11 @@
use diesel::prelude::*;
use super::super::schema::{wordrelation, words};
use diesel::prelude::*;
#[derive(diesel_derive_enum::DbEnum, Debug, Clone, PartialEq, Eq)]
#[DieselTypePath = "crate::db::schema::sql_types::Wordrelationship"]
pub enum WordRelationship {
Definition,
Related
Related,
}
#[derive(diesel_derive_enum::DbEnum, Debug, Clone, PartialEq, Eq)]
@@ -27,7 +27,7 @@ pub enum PartOfSpeech {
SubjConj,
Symbol,
Verb,
Other
Other,
}
#[derive(Queryable, Insertable, Debug, Clone, PartialEq, Eq)]