File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,14 @@ export const getRepos = async (query: any = {}): Promise<Repo[]> => {
1414} ;
1515
1616export const getRepo = async ( name : string ) : Promise < Repo | null > => {
17- name = name . toLowerCase ( ) ;
1817 const collection = await connect ( collectionName ) ;
19- const doc = await collection . findOne ( { name : { $eq : name } } ) ;
18+ const doc = await collection . findOne ( { name : { $eq : name . toLowerCase ( ) } } ) ;
2019 return doc ? toClass ( doc , Repo . prototype ) : null ;
2120} ;
2221
2322export const getRepoByUrl = async ( repoUrl : string ) : Promise < Repo | null > => {
2423 const collection = await connect ( collectionName ) ;
25- const doc = await collection . findOne ( { url : { $eq : repoUrl . toLowerCase ( ) } } ) ;
24+ const doc = await collection . findOne ( { url : { $eq : repoUrl } } ) ;
2625 return doc ? toClass ( doc , Repo . prototype ) : null ;
2726} ;
2827
You can’t perform that action at this time.
0 commit comments