Merge pull request #31 from fLotte-meets-HWR-DB/dev

Dev
pull/32/head
leonnicolas 4 years ago committed by GitHub
commit ec497634ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
.gitignore vendored

@ -2,4 +2,5 @@ node_modules
dist dist
.env .env
.idea .idea
.nyc_output .nyc_output
.dockerignore

@ -45,6 +45,6 @@ POSTGRES_CONNECTION_URL=postgres://username:password@host:port/database_name
``` ```
- __RPC_HOST__ is used for the connection with the [flotte-user-management server](https://github.com/fLotte-meets-HWR-DB/flotte-user-management). - __RPC_HOST__ is used for the connection with the [flotte-user-management server](https://github.com/fLotte-meets-HWR-DB/flotte-user-management).
- __NODE_ENV__ will not check authentication if set to development - __NODE_ENV__ will not check authentication if set to development
- __POSTGRES_CONNECTION_URL__ for connection with the postgres database - __DATABASE_URL__ for connection with the postgres database
If the API server cannot connect to the [flotte-user-management server](https://github.com/fLotte-meets-HWR-DB/flotte-user-management) or the postgres data base. It will try to reconnect in an endless loop. If the API server cannot connect to the [flotte-user-management server](https://github.com/fLotte-meets-HWR-DB/flotte-user-management) or the postgres data base. It will try to reconnect in an endless loop.

1
package-lock.json generated

@ -1220,6 +1220,7 @@
"integrity": "sha512-HUcP3TlgRsuGgeTOn8QMbkdx0hLPXyEJehZIPrcof0ATz7j7aTPA4at7gaiFHCo8gk07DaWYGB3PFgjboXRcWQ==", "integrity": "sha512-HUcP3TlgRsuGgeTOn8QMbkdx0hLPXyEJehZIPrcof0ATz7j7aTPA4at7gaiFHCo8gk07DaWYGB3PFgjboXRcWQ==",
"requires": { "requires": {
"lru-cache": "^5.0.0" "lru-cache": "^5.0.0"
}, },
"dependencies": { "dependencies": {
"lru-cache": { "lru-cache": {

@ -62,9 +62,8 @@ require('dotenv').config();
export const userAPI = new UserServerAPI(process.env.RPC_HOST); export const userAPI = new UserServerAPI(process.env.RPC_HOST);
export function getConnectionOptions (): ConnectionOptions { export function getConnectionOptions (): ConnectionOptions {
return { const ret = {
// @ts-ignore type: (!process.env.DATABASE_TYPE) ? 'postgres' : process.env.DATABASE_TYPE,
type: process.env.DATABASE_TYPE,
url: process.env.DATABASE_URL, url: process.env.DATABASE_URL,
database: process.env.DATABASE_NAME, database: process.env.DATABASE_NAME,
entities: [ entities: [
@ -89,6 +88,11 @@ export function getConnectionOptions (): ConnectionOptions {
synchronize: true, synchronize: true,
logging: false logging: false
}; };
if (ret.database === undefined) {
delete ret.database;
}
// @ts-ignore
return ret;
} }
export async function getApp (connOptions: ConnectionOptions) { export async function getApp (connOptions: ConnectionOptions) {

@ -828,7 +828,6 @@ export default gql`
registeredAt: String registeredAt: String
provider: Provider provider: Provider
contactInformation: ContactInformation contactInformation: ContactInformation
otherData: String
isLocked: Boolean! isLocked: Boolean!
isLockedByMe: Boolean! isLockedByMe: Boolean!
"null if not locked by other user" "null if not locked by other user"
@ -844,7 +843,6 @@ export default gql`
"If Club, at what court registered" "If Club, at what court registered"
registeredAt: String registeredAt: String
contactInformationId: ID contactInformationId: ID
otherData: String
} }
input OrganisationUpdateInput { input OrganisationUpdateInput {
@ -856,7 +854,6 @@ export default gql`
"If Club, at what court registered" "If Club, at what court registered"
registeredAt: String registeredAt: String
contactInformationId: ID contactInformationId: ID
otherData: String
keepLock: Boolean keepLock: Boolean
} }

Loading…
Cancel
Save