# Developing ScholarX backend

**URL:** <https://sef.discourse.group/t/developing-scholarx-backend/169>\
**Category:** ScholarX\
**Created:** [August 18, 2020, 8:00am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169 "2020-08-18T08:00:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 18, 2020, 8:00am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/1 "2020-08-18T08:00:06Z")

</div>

This thread is to be used for scholarX backend development discussions.

Github repository for backend:

> **[sef-global/scholarx](https://github.com/sef-global/scholarx)**
>
> The backend of the ScholarX project. Contribute to sef-global/scholarx development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 18, 2020, 8:04am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/2 "2020-08-18T08:04:50Z")

</div>

I’m working on “Adding JPA annotations to generate mysql tables”.

Issue: [https://github.com/sef-global/scholarx/issues/15](https://github.com/sef-global/scholarx/issues/15)

Deadline: 2020-08-19T18:29:00Z

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [August 18, 2020, 11:26am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/3 "2020-08-18T11:26:29Z")

</div>

Hi @piumal1999 Thanks for working on the feature 😍 .Can you please create an issue for this.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 18, 2020, 4:17pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/4 "2020-08-18T16:17:13Z")

</div>

Added the PR. Please review and merge

> <https://github.com/sef-global/scholarx/pull/16>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 29, 2020, 6:31pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/5 "2020-08-29T18:31:11Z")

</div>

I am working on Admin APIs of ScholarX. I have sent a draft pull request for following tasks.

- An endpoint to delete a mentee
- An endpoint to get a list of mentors in a program
- An endpoint to get update the state of a mentor

> <https://github.com/sef-global/scholarx/pull/25>

I’m not sure whether this is the most suitable way to complete the issue.  
@YohanAvishke could you please check it and let me know.

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [August 30, 2020, 7:30am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/6 "2020-08-30T07:30:39Z")

</div>

Please review and merge

> <https://github.com/sef-global/scholarx/pull/26>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [September 1, 2020, 3:19pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/7 "2020-09-01T15:19:35Z")

</div>

> [@piumal1999](#):
>
> [github.com/sef-global/scholarx](https://github.com/sef-global/scholarx/pull/25)
> 
> #### [Write admin APIs for mentor, mentee and program](https://github.com/sef-global/scholarx/pull/25)
> 
> `sef-global:master` ← `Piumal1999:admin-apis`
> 
> opened Aug 29, 2020
> 
> [![Piumal1999](https://global.discourse-cdn.com/free1/uploads/sef/original/1X/660be3aea568726f65a0dce2aea01191d7a44c87.jpeg) Piumal1999 ](https://github.com/Piumal1999)
> 
> [+272 -5](https://github.com/sef-global/scholarx/pull/25/files)

I have checked it using Swagger UI. Btw I think we need to disable CSRF to make the APIs functional. @YohanAvishke is it okay if I add the security config file to my PR and disable csrf?

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [September 2, 2020, 6:08am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/8 "2020-09-02T06:08:20Z")

</div>

Sure @piumal1999, add a file named `SecurityConfig` in the `config` directory with the changes.  
Make sure to create a different commit without squashing.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [September 4, 2020, 3:52am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/9 "2020-09-04T03:52:24Z")

</div>

Updated the PR. Please review and merge. [https://github.com/sef-global/scholarx/pull/25](https://github.com/sef-global/scholarx/pull/25)

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [September 5, 2020, 6:13am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/10 "2020-09-05T06:13:03Z")

</div>

> <https://github.com/sef-global/scholarx/pull/28>

@piumal1999 please add test cases to your PR. You can find examples in the above PR. Please ping me if you need any help.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [September 5, 2020, 7:20pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/11 "2020-09-05T19:20:24Z")

</div>

Updated the PR with requested changes  
Added unit tests for 3 new admin APIs

> <https://github.com/sef-global/scholarx/pull/25>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [September 14, 2020, 3:48pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/12 "2020-09-14T15:48:34Z")

</div>

Created issues for common and user APIs

Ps: Created issues for other APIs also

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [September 26, 2020, 3:07pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/13 "2020-09-26T15:07:15Z")

</div>

Created common APIs and unit test for those.

> <https://github.com/sef-global/scholarx/pull/45>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [October 3, 2020, 6:37pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/14 "2020-10-03T18:37:31Z")

</div>

Found a bug in this PR. (An infinite loop in GET mentors endpoint)  
Fixed the bug with PR#49

> <https://github.com/sef-global/scholarx/pull/49>

Please review and merge

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [October 4, 2020, 5:31am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/15 "2020-10-04T05:31:30Z")

</div>

Created User APIs. Please review and merge

> <https://github.com/sef-global/scholarx/pull/46>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [October 4, 2020, 9:18pm UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/16 "2020-10-04T21:18:49Z")

</div>

I created the mentor APIs with unit tests  
But i couldn’t test the changes with a real database

> <https://github.com/sef-global/scholarx/pull/47>

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [October 17, 2020, 3:23am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/17 "2020-10-17T03:23:37Z")

</div>

`curl --location --request PUT 'program/{programId}/mentees/{menteeId}/status'`

In requests similar to above which require `programId` to identify an element, wouldn’t it be better to add the `programId` as a query param? Following are some points to support the statement,

1. Param is an identification parameter, so it’s better to be in the query.
2. We can simplify the resource paths:  
`curl --location --request PUT 'mentees/{menteeId}/status?programId='`
3. This leads to a better and simpler folder structure.

WDYT?

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [October 17, 2020, 6:11am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/18 "2020-10-17T06:11:37Z")

</div>

Yeah. That’s good. So, shall i update the backend?

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [October 17, 2020, 6:20am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/19 "2020-10-17T06:20:17Z")

</div>

Yeah update your PR with the change also change the directory structure accordingly

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [October 17, 2020, 7:27am UTC](https://sef.discourse.group/t/developing-scholarx-backend/169/20 "2020-10-17T07:27:35Z")

</div>

Do we need to add the requested change to the user APIs also?

Pull request for USER API:

> <https://github.com/sef-global/scholarx/pull/46>

[Next page](https://sef.discourse.group/t/developing-scholarx-backend/169.md?page=2)
