Skip to content

Commit 525bde1

Browse files
committed
review address
Signed-off-by: Sagar <sagargurung1001@gmail.com>
1 parent 00f3d76 commit 525bde1

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ For the manual installation of `OpenProject` as an external application of `Next
55

66
### 1. Install `app_api` application
77

8-
Assuming you’re in the apps folder of Nextcloud with command git:
8+
Assuming you’re in the apps folder directory:
99

1010
- Clone
1111
```bash
12-
git clone https://github.com/cloud-py-api/app_api.git
12+
git clone https://github.com/nextcloud/app_api.git
1313
```
1414
- build
1515
```bash
1616
cd app_api
1717
npm ci && npm run dev
1818
```
1919
- Enable the `app_api`
20-
2120
```bash
2221
# Assuming you’re in nextcloud server root directory
2322
sudo -u www-data php occ a:e app_api
@@ -26,7 +25,7 @@ Assuming you’re in the apps folder of Nextcloud with command git:
2625
### 2. Register deploy daemons (In Nextcloud)
2726

2827
- Navigate to `Administration Settings > AppAPI`
29-
- Click register daemons
28+
- Click `Register Daemon`
3029
- Select `Manual Install` for Daemon configuration template
3130
- Put `manual_install` for name and display name
3231
- Deployment method as `manual-install`
@@ -48,16 +47,16 @@ foreman start -f Procfile.dev
4847
```
4948

5049
### 4. Configure and Run External `openproject-nextcloud-app` application
51-
Assuming you’re in the apps folder of Nextcloud with command git:
50+
Assuming you’re in the apps folder directory:
5251

5352
- Clone
5453
```bash
5554
git clone https://github.com/JankariTech/openproject-nextcloud-app.git
5655
```
5756
- Configure script before running external app
5857
```bash
59-
cd openproject-nextcloud-app
60-
cp ex_app_run_script.sh.example ex_app_run_script.sh
58+
cd openproject-nextcloud-app
59+
cp ex_app_run_script.sh.example ex_app_run_script.sh
6160
```
6261
Once you have copied the script to run the external application, configure the following environments
6362

@@ -73,6 +72,12 @@ Assuming you’re in the apps folder of Nextcloud with command git:
7372
- OP_BACKEND_URL is the url in which `OpenProject` is up and running
7473
- NEXTCLOUD_URL the url in which `Nextcloud` is up and running
7574

75+
- Install required Python packages to run external application `openproject-nextcloud-app`
76+
```bash
77+
# Make sure that you have python3 installed in your local system
78+
python3 -m pip install -r requirements.txt
79+
```
80+
7681
- Run external application with the script
7782
```bash
7883
bash ex_app_run_script.sh

lib/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def proxy_request_to_server(request: Request, path: str):
113113
headers=headers,
114114
)
115115
else:
116-
# for getting oauth token the content-type 'application/x-www-form-urlencoded' sems to be required
116+
# for getting oauth token the content-type 'application/x-www-form-urlencoded' seems to be required
117117
if request.method == 'POST' and "/oauth/token" in url:
118118
headers.update({'content-type': 'application/x-www-form-urlencoded'})
119119
response = await client.request(
@@ -132,10 +132,10 @@ async def proxy_request_to_server(request: Request, path: str):
132132
response.headers["location"] = redirect_url
133133
response.status_code = 200
134134
elif "oauth/authorize" in url:
135-
response.headers["location"] = response.headers["location"]
135+
return response
136136
elif "apps/oauth2/authorize" in response.headers["location"]:
137-
response.headers["location"] = response.headers["location"]
138137
response.status_code = 200
138+
return response
139139
else:
140140
headers["content-length"] = "0"
141141
response = await handle_redirects(

0 commit comments

Comments
 (0)