Skip to content

Commit

Permalink
Merge pull request #82 from souravbhowmik1999/oblfLastest
Browse files Browse the repository at this point in the history
Show all schools in alphabetical order
  • Loading branch information
Sourav-Tekdi authored Oct 28, 2024
2 parents 6ba9621 + 865d0e6 commit 0caf86a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/adapters/postgres/fields-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export class PostgresFieldsService implements IServicelocatorfields {
}
for (let data of result) {
if ((data?.dependsOn == '' || data?.dependsOn == undefined || data?.dependsOn == null || data?.dependsOn == 'NULL') && data?.sourceDetails?.source === 'table' || data?.sourceDetails?.source === 'jsonfile') {
let options = await this.findDynamicOptions(data.sourceDetails.table);
let order = `ORDER BY name ASC`;
// let options = await this.findDynamicOptions(data.sourceDetails.table);
let options = await this.findDynamicOptions(data.sourceDetails.table, null, null, null, order);
data.fieldParams = data.fieldParams || {};
data.fieldParams.options = options;
}
Expand Down Expand Up @@ -949,7 +951,6 @@ export class PostgresFieldsService implements IServicelocatorfields {

query = `SELECT *,COUNT(*) OVER() AS total_count FROM public."${tableName}" ${whereCond} ${orderCond} ${offsetCond} ${limitCond}`


result = await this.fieldsRepository.query(query);
if (!result) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/postgres/user-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ export class PostgresUserService implements IServicelocator {

let errKeycloak = "";
let resKeycloak = "";

const keycloakResponse = await getKeycloakAdminToken();
const token = keycloakResponse.data.access_token;
let checkUserinKeyCloakandDb = await this.checkUserinKeyCloakandDb(userCreateDto)
// let checkUserinDb = await this.checkUserinKeyCloakandDb(userCreateDto.username);

if (checkUserinKeyCloakandDb) {
return APIResponse.error(response, apiId, "Forbidden", `User Already Exist`, HttpStatus.FORBIDDEN);
}
Expand Down

0 comments on commit 0caf86a

Please sign in to comment.