Merge pull request #113 from ejscheepers/main
Fix Issue #112: Track api route was not unsubscribing contacts + documentation fixes
This commit is contained in:
+7
-2
@@ -8,11 +8,16 @@ Support can be asked in the `#contributions` channel of the [Plunk Discord serve
|
|||||||
|
|
||||||
- Docker needs to be [installed](https://docs.docker.com/engine/install/) on your system.
|
- Docker needs to be [installed](https://docs.docker.com/engine/install/) on your system.
|
||||||
|
|
||||||
### 2. Set your environment variables
|
### 2. Install dependencies
|
||||||
|
|
||||||
|
- Run `yarn install` to install the dependencies.
|
||||||
|
|
||||||
|
### 3. Set your environment variables
|
||||||
|
|
||||||
- Copy the `.env.example` files in the `api`, `dashboard` and `prisma` folder to `.env` in their respective folders.
|
- Copy the `.env.example` files in the `api`, `dashboard` and `prisma` folder to `.env` in their respective folders.
|
||||||
|
- Set AWS credentials in the `api` `.env` file.
|
||||||
|
|
||||||
### 3. Start resources
|
### 4. Start resources
|
||||||
|
|
||||||
- Run `yarn services:up` to start a local database and a local redis server.
|
- Run `yarn services:up` to start a local database and a local redis server.
|
||||||
- Run `yarn migrate` to apply the migrations to the database.
|
- Run `yarn migrate` to apply the migrations to the database.
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plunk",
|
"name": "plunk",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "agpl-3.0",
|
"license": "agpl-3.0",
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# ENV
|
# ENV
|
||||||
JWT_SECRET=mysupersecretJWTsecret
|
JWT_SECRET=mysupersecretJWTsecret
|
||||||
REDIS_URL=redis://127.0.0.1:56379
|
REDIS_URL=redis://127.0.0.1:56379
|
||||||
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
|
DATABASE_URL=postgresql://postgres:postgres@localhost:55432/postgres
|
||||||
DISABLE_SIGNUPS=false
|
DISABLE_SIGNUPS=false
|
||||||
|
|
||||||
# AWS
|
# AWS
|
||||||
|
|||||||
@@ -78,15 +78,12 @@ export class V1 {
|
|||||||
redis.del(Keys.Contact.id(contact.id));
|
redis.del(Keys.Contact.id(contact.id));
|
||||||
redis.del(Keys.Contact.email(project.id, contact.email));
|
redis.del(Keys.Contact.email(project.id, contact.email));
|
||||||
} else {
|
} else {
|
||||||
if (subscribed && contact.subscribed !== subscribed) {
|
if (subscribed !== null && contact.subscribed !== subscribed) {
|
||||||
contact = await prisma.contact.update({
|
contact = await prisma.contact.update({where: {id: contact.id}, data: {subscribed}});
|
||||||
where: { id: contact.id },
|
|
||||||
data: { subscribed },
|
|
||||||
});
|
|
||||||
|
|
||||||
redis.del(Keys.Contact.id(contact.id));
|
redis.del(Keys.Contact.id(contact.id));
|
||||||
redis.del(Keys.Contact.email(project.id, contact.email));
|
redis.del(Keys.Contact.email(project.id, contact.email));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user