Closed fbl773 closed 1 month ago
Nice work on the conversion man! I'm going to review this properly after I get some sleep.
Initial thought: I think it would have been great to have the typescript conversion done as a PR and then the mongo conversion done as a PR. That way we can incrementally check to see if each conversion broke something. By doing it both at the same time it'll be a bit harder to figure out which conversion causes a particular issue. Maybe it's a mixture of both?
Yea, you're not wrong on that. I just had issues with how they were handling requests, seemed like a lot of code to switch to typescript that we likely weren't going to keep. Big regression potential for sure.
The tester role was used to identify the testing team. So,
Admin - developers Tester - testing team
On Sat, Apr 27, 2024, 9:55 a.m. fbl773 @.***> wrote:
@.**** commented on this pull request.
In backend_tsc/src/entitites/user.ts https://github.com/fbl773/point-b_ank/pull/24#discussion_r1581850985:
+import {IMongo_Entity} from "./mongo_entity"; + +export interface IUser extends IMongo_Entity{
- username:string,
- password:string,
- active:boolean
- role:string
+}
+type UserModel = Model
; +const userSchema= new Schema<IUser,UserModel>({ - username:{type:String, required:true,trim:true},
- password:{type:String, required:true,trim:true},
- active:{type:Boolean, required:true, default:true},
- role:{type:String,required:true,enum:["admin","tester"]}//wtf is tester?
@DanielleDPowell https://github.com/DanielleDPowell Do you have any insight on this? What is the tester role all about?
— Reply to this email directly, view it on GitHub https://github.com/fbl773/point-b_ank/pull/24#discussion_r1581850985, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAR354OGDZ32Z6FVG6XWCALY7PC7HAVCNFSM6AAAAABG3WUHF2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMRWGY3TAMBWGU . You are receiving this because you were mentioned.Message ID: @.***>
The tester role was used to identify the testing team. So, Admin - developers Tester - testing team … On Sat, Apr 27, 2024, 9:55 a.m. fbl773 @.> wrote: @*.*** commented on this pull request. ------------------------------ In backend_tsc/src/entitites/user.ts <#24 (comment)>: > +import {IMongo_Entity} from "./mongo_entity"; + +export interface IUser extends IMongo_Entity{ + username:string, + password:string, + active:boolean + role:string + +} + +type UserModel = Model
; +const userSchema= new Schema<IUser,UserModel>({ + username:{type:String, required:true,trim:true}, + password:{type:String, required:true,trim:true}, + active:{type:Boolean, required:true, default:true}, + role:{type:String,required:true,enum:["admin","tester"]}//wtf is tester? @DanielleDPowell https://github.com/DanielleDPowell Do you have any insight on this? What is the tester role all about? — Reply to this email directly, view it on GitHub <#24 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAR354OGDZ32Z6FVG6XWCALY7PC7HAVCNFSM6AAAAABG3WUHF2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMRWGY3TAMBWGU . You are receiving this because you were mentioned.Message ID: @.>
Is there anything that will break if I don't include it in the upgrade? Did it have any privilege that the admin account didn't?
Closes #9 Closes #4
Important Changes
yarn
overnpm
Details
All routes were tested via postman and match the routes from the original. Seeing as we are using mongo, put/post routes are expecting a JSON object that matches the spec of its corresponding mongo collection. That is, the
body
of aPOST
request to/material
should implementIMaterial
(save for the ID of course because mongo handles that).Remaining
authenticate()
--> Is a dummy rn for testing, works but must be reactivated.Requesting Feedback On
./entities/material.ts
line17
. Failing to meet these constraints will result in an error response. Is this how we should handle this? I would argue yes... but to an extent... worth discussion. See #26site, region, culture, etc
into a single file such that we do not need so many imports in app.js./entities
to higher level - If we did this, we would have the tools necessary to re-build the frontend entities with typescript and a common data contract. I'm not sure how the_id
field will like this but I'm sure it is possible.