Skip to content

Commit

Permalink
Fix/user type (#1830)
Browse files Browse the repository at this point in the history
* added post in user type

* 'fix

* fix

* created appUserProfile model

* send appUserProfile in auth to client

* added appUserProfile in sampleData

* merged

* merged

* fix failing test

* fix failing test

* fix

* fix failing test

* fix failing test

* fix failing test

* fix failing test

* added more test

* added more test

* fix failing test

* fix failing test

* added more test

* fix failing test

* added more test

* added more test

* fixed warnings

* Squashed commit of the following:

commit e50baf9
Merge: 3fd0675 65989b1
Author: ANKIT VARSHNEY <132201033+AVtheking@users.noreply.github.com>
Date:   Tue Feb 13 23:34:06 2024 +0530

    Merge branch 'PalisadoesFoundation:develop' into develop

commit 65989b1
Author: Paras Awasthi <121304240+i-m-Paras@users.noreply.github.com>
Date:   Tue Feb 13 18:21:56 2024 +0530

    removeAdvertisement.ts test updated to 100% coverage (#1835)

    * removeAdvertisement.ts test updated to 100% coverage

    * failing tests updated

    * Update package.json

    * Update package.json

    * Update package-lock.json

    * Update package.json

    * Update package.json

    * Update package.json

    * Update package.json

    * Update package-lock.json back to normal

    * Update package-lock.json

    * Update package-lock.json

    * Update package-lock.json

    * Update package-lock.json

commit cc21e65
Author: Anvita Mahajan <78889572+Anvita0305@users.noreply.github.com>
Date:   Tue Feb 13 18:21:20 2024 +0530

    Added tests for file src/resolvers/Mutation/createPost.ts (#1833)

    * Modified tests

    * some minor changes

    * Fixed Errors

    * 100% code covered

    * Fixed Linting errors

commit f95b71f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 12 10:12:01 2024 -0800

    chore(deps): bump @types/validator from 13.11.8 to 13.11.9 (#1845)

    Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.11.8 to 13.11.9.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

    ---
    updated-dependencies:
    - dependency-name: "@types/validator"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit a6a5758
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 12 09:51:43 2024 -0800

    chore(deps): bump @graphql-codegen/typescript from 4.0.1 to 4.0.4 (#1846)

    Bumps [@graphql-codegen/typescript](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/typescript) from 4.0.1 to 4.0.4.
    - [Release notes](https://github.com/dotansimha/graphql-code-generator/releases)
    - [Changelog](https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/typescript/CHANGELOG.md)
    - [Commits](https://github.com/dotansimha/graphql-code-generator/commits/@graphql-codegen/typescript@4.0.4/packages/plugins/typescript/typescript)

    ---
    updated-dependencies:
    - dependency-name: "@graphql-codegen/typescript"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit b738582
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 12 09:49:35 2024 -0800

    chore(deps): bump lint-staged from 15.2.1 to 15.2.2 (#1844)

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.2.1 to 15.2.2.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
    - [Commits](lint-staged/lint-staged@v15.2.1...v15.2.2)

    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 56cb29f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 12 09:49:16 2024 -0800

    chore(deps): bump nodemailer from 6.9.8 to 6.9.9 (#1843)

    Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.8 to 6.9.9.
    - [Release notes](https://github.com/nodemailer/nodemailer/releases)
    - [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
    - [Commits](nodemailer/nodemailer@v6.9.8...v6.9.9)

    ---
    updated-dependencies:
    - dependency-name: nodemailer
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit b445770
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 12 09:48:58 2024 -0800

    chore(deps): bump @typescript-eslint/eslint-plugin from 6.20.0 to 6.21.0 (#1842)

    Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.20.0 to 6.21.0.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin)

    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 125853a
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 23:20:44 2024 +0530

    Update pull_changes.yml

commit d069d40
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 22:57:38 2024 +0530

    Update Advertisement.ts

commit 5fe0ae8
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 22:44:37 2024 +0530

    Update pull_changes.yml

commit 26e0d10
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 22:40:11 2024 +0530

    Update push.yml

commit 60d4b4b
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 22:18:30 2024 +0530

    Update push.yml

commit 07f7042
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 22:01:00 2024 +0530

    Update Advertisement.ts

commit 12ccdb6
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 21:29:14 2024 +0530

    Update Advertisement.ts

commit 4e6113d
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 21:26:51 2024 +0530

    Update push.yml

commit 73b68f0
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:57:18 2024 +0530

    Update Advertisement.ts

commit 70701ba
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:54:11 2024 +0530

    Update push.yml

commit 57f4d91
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:30:17 2024 +0530

    Update Advertisement.ts

commit e1bbff6
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:25:45 2024 +0530

    Update pull_changes.yml

commit 332c429
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:06:36 2024 +0530

    Update pull_changes.yml

commit d7450c4
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 20:06:01 2024 +0530

    Update push.yml

commit 7b9a88f
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 19:50:17 2024 +0530

    Update push.yml

commit 94d2d18
Author: TASNEEM KOUSHAR <imatasneemkoushar@gmail.com>
Date:   Sun Feb 11 19:39:08 2024 +0530

    Create pull_changes.yml

commit 031adf9
Author: Peter Harrison <16875803+palisadoes@users.noreply.github.com>
Date:   Sat Feb 10 19:27:48 2024 -0800

    Restore the automated-docs if statement

commit 3fd0675
Merge: ad9a412 fa10711
Author: ANKIT VARSHNEY <132201033+AVtheking@users.noreply.github.com>
Date:   Fri Feb 9 00:59:59 2024 +0530

    Merge branch 'PalisadoesFoundation:develop' into develop
  • Loading branch information
AVtheking authored Feb 14, 2024
1 parent fa10711 commit 9321a1c
Show file tree
Hide file tree
Showing 191 changed files with 6,725 additions and 3,670 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pull_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Copy Docs to Talawa Docs

on:
schedule:
- cron: '*/5 * * * *'
jobs:
copy-docs-to-talawa-docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/automated-docs'
# needs: Generate-Documentation
steps:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
with:
source_file: 'talawa-api-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
destination_branch: 'develop'
destination_folder: 'docs/'
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
commit_message: 'Talawa API docs updated'
37 changes: 19 additions & 18 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
Generate-Documentation:
name: Generate Documentation
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/automated-docs'
if: github.ref == 'refs/heads/develop'
needs: Push-Workflow
steps:
- name: Checkout repository
Expand Down Expand Up @@ -150,23 +150,24 @@ jobs:
name: documentation-api
path: talawa-api-docs

Copy-docs-to-talawa-docs:
runs-on: ubuntu-latest
needs: Generate-Documentation
steps:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
with:
source_file: 'talawa-api-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
destination_branch: 'develop'
destination_folder: 'docs/'
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
commit_message: 'Talawa API docs updated'

# Copy-docs-to-talawa-docs:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/automated-docs'
# # needs: Generate-Documentation
# steps:
# - uses: actions/checkout@v3
# - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
# env:
# API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
# with:
# source_file: 'talawa-api-docs/'
# destination_repo: 'PalisadoesFoundation/talawa-docs'
# destination_branch: 'develop'
# destination_folder: 'docs/'
# user_email: '${{env.email}}'
# user_name: '${{github.actor}}'
# commit_message: 'Talawa API docs updated'

# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file
Deploy-Workflow:
name: Deploying Application to Cloud VPS
Expand Down
50 changes: 27 additions & 23 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ You will need to have copies of your code on your local system. Here's how to do

## Install node.js

Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.
Best way to install and manage `node.js` is making use of node version managers. Two most popular node version managers right now are [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). We'd recommend `fnm` because it's written in `rust` and is much faster than `nvm`. Install whichever one you want and follow their guide to set up `node.js` on your system ensure the installation of Node.js version 20 LTS.

## Install npm

npm is a package manager for Node.js and is installed with Node.js. npm is used to install, share, and distribute code as well as to manage dependencies in your projects. To check if you have npm installed you can run this command in your terminal:

```
npm -v
```

If you have it installed then you should see the version that's installed. If not, you can download Node.js and npm from the official [Node.js website](https://nodejs.org/en/download/).

## Install TypeScript
Expand All @@ -95,6 +97,7 @@ To install TypeScript, you can use npm:
```bash
npm install -g typescript
```

This command installs TypeScript globally on your system so that it can be accessed from any project.

## Install git
Expand Down Expand Up @@ -250,7 +253,7 @@ Remember to adjust any paths or details as needed for your specific environment.
It's important to configure Talawa-API to complete it's setup.
A configuration file named `.env` is required in the root directory of `Talawa-API` for storing environment variables used at runtime. It is not a part of the repo and you will have to create it.
A configuration file named `.env` is required in the root directory of `Talawa-API` for storing environment variables used at runtime. It is not a part of the repo and you will have to create it.
## Automated Configuration of `.env`
Expand All @@ -275,27 +278,28 @@ Use this command to do this
```
cp .env.sample .env
```

### The Environment Variables in `.env`

This `.env` file must be populated with the following environment variables for talawa-api to work:

| Variable | Description |
| ---------------------------- | ------------------------------------------------------ |
| NODE_ENV | Used for providing the environment in which the the talawa-api is running |
| ACCESS_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| REFRESH_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| MONGO_DB_URL | Used for connecting talawa-api to the mongoDB database |
| RECAPTCHA_SECRET_KEY | Used for authentication using reCAPTCHA |
| RECAPTCHA_SITE_KEY | Used for authentication using reCAPTCHA |
| MAIL_USERNAME | Used for mailing service |
| MAIL_PASSWORD | Used for mailing service |
| LAST_RESORT_SUPERADMIN_EMAIL | Used for promoting the default super admin |
| COLORIZE_LOGS | Used for colorized log formats in console |
| LOG_LEVEL | Used for setting the logging level |
| REDIS HOST | Used for connecting talawa-api to the redis instance |
| REDIS_PORT | Specifies the port of the active redis-server |
| REDIS_PASSWORD(optional) | Used for authenticating the connection request to |
| | a hosted redis-server |
| Variable | Description |
| ---------------------------- | ------------------------------------------------------------------------- |
| NODE_ENV | Used for providing the environment in which the the talawa-api is running |
| ACCESS_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| REFRESH_TOKEN_SECRET | Used for signing/verifying JWT tokens |
| MONGO_DB_URL | Used for connecting talawa-api to the mongoDB database |
| RECAPTCHA_SECRET_KEY | Used for authentication using reCAPTCHA |
| RECAPTCHA_SITE_KEY | Used for authentication using reCAPTCHA |
| MAIL_USERNAME | Used for mailing service |
| MAIL_PASSWORD | Used for mailing service |
| LAST_RESORT_SUPERADMIN_EMAIL | Used for promoting the default super admin |
| COLORIZE_LOGS | Used for colorized log formats in console |
| LOG_LEVEL | Used for setting the logging level |
| REDIS HOST | Used for connecting talawa-api to the redis instance |
| REDIS_PORT | Specifies the port of the active redis-server |
| REDIS_PASSWORD(optional) | Used for authenticating the connection request to |
| | a hosted redis-server |

The following sections will show you how to configure each of these parameters.

Expand Down Expand Up @@ -532,7 +536,6 @@ If the parameter value is set to `true`, you should be able to see colorized log
There are different logging levels that can be configured by setting this parameter. The severity order of levels are displayed numerically ascending from most important to least important.
```
levels = {
error: 0,
Expand Down Expand Up @@ -571,8 +574,9 @@ You can pass the following arguments while running this script.
- `npm run import:sample-data`: This command will import the complete sample database without removing the existing data.
- `npm run import:sample-data -- --format`: This command will import the complete sample database after removing the existing data.
- `npm run import:sample-data -- --format --items=users,organizations`: This command will import the sample `users` and `organizations` collections after cleaning the existing data.
- `npm run import:sample-data -- --items=users,organizations`: This command will import the sample `users` and `organizations` collections without cleaning the existing data.
- `npm run import:sample-data -- --format --items=users,organizations,appUserProfiles`: This command will import the sample `users` , `organizations` and `appUserProfiles` collections after cleaning the existing data.
- `npm run import:sample-data -- --items=users,organizations,appUserProfiles`: This command will import the sample `users` , `organizations`
ans `appUserProfiles` collections without cleaning the existing data.
## Sample Data Overview:
Expand Down Expand Up @@ -769,4 +773,4 @@ Talawa-api makes use of `vitest` to run tests because it is much faster than `je
You can run the tests for talawa-api using this command:
npm run test
npm run test
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ Core features include:

<!-- toc -->

- [Talawa API](#talawa-api)
- [Talawa Components](#talawa-components)
- [Documentation](#documentation)
- [Installation](#installation)
- [Image Upload](#image-upload)
- [Talawa Components](#talawa-components)
- [Documentation](#documentation)
- [Installation](#installation)
- [Image Upload](#image-upload)

<!-- tocstop -->

Expand Down
Loading

0 comments on commit 9321a1c

Please sign in to comment.