Closed joschahenningsen closed 5 months ago
Is openingtimes already migrated? I could not find it.
Nope, that isn't being worked on yet.
I am going to work on this task in the following weeks.
Could you please give me some information about the migration? Is there a new api version and do we want to migrate these endpoints to the new one?
As i understand it, the old backend is private source so you cant take that as a starting point.
Some of these will be implemented in #1422
The code is located in the campus-backend repo and there is a swagger file so this is where you might start.
Yes, we basically want to reimplement the current (closed source) api written in php. It might make sense to open source it to aid the progress here. Let's discuss this in the next team meeting (ping @kordianbruck)
For further discussion I suggest meeting up about this on discord? @barisconur You're on the server already, right?
@joschahenningsen I am not on the server. Could you please send dc server link? @kordianbruck When is the next team meeting?
@barisconur https://discord.gg/WSRzBkr7
Next meeting is scheduled for June, first @ 7PM
Yes, we basically want to reimplement the current (closed source) api written in php. It might make sense to open source it to aid the progress here. Let's discuss this in the next team meeting (ping @kordianbruck)
Hello again. I am going to work on this migration endpoints in the next 2 weeks. How can I access the source code of old api written in php.
Yes, we basically want to reimplement the current (closed source) api written in php. It might make sense to open source it to aid the progress here. Let's discuss this in the next team meeting (ping @kordianbruck)
Hello again. I am going to work on this migration endpoints in the next 2 weeks. How can I access the source code of old api written in php.
Additionally, I created a new branch and I am trying to push it to the repo but it throws the error below.
remote: Permission to TUM-Dev/Campus-Backend.git denied to barisconur. fatal: unable to access 'https://github.com/TUM-Dev/Campus-Backend.git/': The requested URL returned error: 403
You can not directly push to this repository if you are not a member. Instead you have to fork the repository, clone your fork (or set the git parameters in the version you have downloaded at the moment). Then you can push commits to your forked repo. These commits can then be added with a Pull Request from your forked repo to this repository.
@tobiasjungmann I am stuck at connecting my local database. I created a mariadb running container with:
docker run --detach \ --name mariadb-tum-backend \ --env MARIADB_USER=root \ --env MARIADB_ROOT_PASSWORD=example \ --restart always \ -p 3306:3306 \ --volume "$(pwd)"/init.sql:/init.sql \ mariadb:latest --init-file /init.sql
I am able to connect it via DataGrip but I am not sure how to connect it in main.go. I tried: // main.go line 49-50
// conn = sqlite.Open("test.db") conn = mysql.Open("jdbc:mariadb://localhost:3306")
@barisconur no need to modify the code. To connect to the local mariadb you have to add the database connection string (root:example@tcp(localhost:3306)/tca-portal?charset=utf8mb4&parseTime=True&loc=Local
) to your environment variables like this:
@barisconur no need to modify the code. To connect to the local mariadb you have to add the database connection string (
root:example@tcp(localhost:3306)/tca-portal?charset=utf8mb4&parseTime=True&loc=Local
) to your environment variables like this:
Hello, It throws this error:
I also tried with:
root:example@tcp(localhost:3306)/mariadb-tum-backend?charset=utf8mb4&parseTime=True&loc=Local
I changed tca_portal to mariadb-tum-backend.
Not sure if you successfully imported the database schema. If not, open the database connection in dataGrip, create a new query console, run CREATE DATABASE tca-portal;
and then run this script on the database: https://raw.githubusercontent.com/TUM-Dev/Campus-Backend/db-models/model/souce-schema.sql
https://raw.githubusercontent.com/TUM-Dev/Campus-Backend/db-models/model/souce-schema.sql
Thanks. But it gives sql syntax error for "CREATE DATABASE tca-portal;". So I changed it to "tca_portal". But then the script threw some errors afterwards.
Cronjobs
alarm
⇒ #220kino
(nowmovies
) ⇒ #213news
⇒ #3, #4roomfinder
-> #215mensa
-> is this nessesary?Endpoints
This is a list of endpoints that should be served here (via rest and grpc): Update Note (previously unused in the Android app ⇒ needs a discussion)
GET /updatenote/:version
⇒ #226Members/Users
POST /members/:lrz_id
notifications
GET /notifications
GET /notifications/confirm/:notification_id
Device
POST /device/register
GET /device/verifyKey
POST /device/addGcmToken
GET /device/uploaded/:lrz_id
Feedback
POST /feedback
(merged with)POST /feedback/:id/:image_nr
⇒ #199 #228Cafeterias
GET /mensen
Kinos
GET /kino/:last_id
⇒ https://github.com/TUM-Dev/Campus-Backend/pull/213News
GET /news/:last_news_id
⇒ #227GET /news/sources
GET /news/alert
⇒ https://github.com/TUM-Dev/Campus-Backend/pull/219other endpoints
Study Rooms (basically just a thin API-Wrapper around iris' api. Unclear if needed)
- [ ] `GET /studyroom/list`
Events And Tickets (currently unused ⇒ needs a discussion if this is needed)
- [ ] `GET /event/list` - [ ] `POST /event/ticket/my` - [ ] `POST /event/ticket/:ticket_id` - [ ] `GET /event/ticket//type/:event_id` - [ ] `POST /event/ticket/reserve/multiple` - [ ] `POST /event/ticket/payment/stripe/purchase/multiple` - [ ] `POST /event/ticket/payment/stripe/ephemeralkey` - [ ] `GET /event/ticket/status/:event_id`
Offloaded to [NavigaTUM](https://github.com/TUM-Dev/NavigaTUM)
## Opening Hours - [ ] `GET /openingtimes/:language` - [ ] `GET /locations/:location_id` - [ ] `GET /barrierfree/contacts` - [x] `GET /barrierfree/getBuilding2Gps` - [x] `GET /barrierfree/nerby/:building_id` - [x] `GET /barrierfree/listOfToilets` - [x] `GET /barrierfree/listOfElevators` - [ ] `GET /barrierfree/moreInformation`