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

1
.gitignore vendored

@ -3,3 +3,4 @@ dist
.env
.idea
.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).
- __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.

1
package-lock.json generated

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

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

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

Loading…
Cancel
Save