Skip to content

Commit

Permalink
Merge pull request #224 from pulsar-edit/compact-query
Browse files Browse the repository at this point in the history
Modularize Query Parameters
  • Loading branch information
confused-Techie authored Jan 13, 2024
2 parents a0079c6 + 3180ec9 commit 94648cf
Show file tree
Hide file tree
Showing 41 changed files with 689 additions and 530 deletions.
10 changes: 0 additions & 10 deletions scripts/parameters/auth.js

This file was deleted.

15 changes: 0 additions & 15 deletions scripts/parameters/direction.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/parameters/engine.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/parameters/fileExtension.js

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/parameters/login.js

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/parameters/packageName.js

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/parameters/page.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/parameters/query.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/parameters/service.js

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/parameters/serviceType.js

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/parameters/serviceVersion.js

This file was deleted.

18 changes: 0 additions & 18 deletions scripts/parameters/sort.js

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/parameters/versionName.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
database: require("./database.js"),
webhook: require("./webhook.js"),
server_version: require("../package.json").version,
query: require("./query.js"),
query: require("./query_parameters/index.js").logic,
vcs: require("./vcs.js"),
config: require("./config.js").getConfig(),
utils: require("./utils.js"),
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/getOwnersOwnerName.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
params: {
page: (context, req) => { return context.query.page(req); },
sort: (context, req) => { return context.query.sort(req); },
direction: (context, req) => { return context.query.dir(req); },
direction: (context, req) => { return context.query.direction(req); },
owner: (context, req) => { return context.query.owner(req); }
},

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/getPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
params: {
page: (context, req) => { return context.query.page(req); },
sort: (context, req) => { return context.query.sort(req); },
direction: (context, req) => { return context.query.dir(req); },
direction: (context, req) => { return context.query.direction(req); },
serviceType: (context, req) => { return context.query.serviceType(req); },
service: (context, req) => { return context.query.service(req); },
serviceVersion: (context, req) => { return context.query.serviceVersion(req); },
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/getPackagesSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
params: {
sort: (context, req) => { return context.query.sort(req); },
page: (context, req) => { return context.query.page(req); },
direction: (context, req) => { return context.query.dir(req); },
direction: (context, req) => { return context.query.direction(req); },
query: (context, req) => { return context.query.query(req); }
},

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/getThemes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
params: {
page: (context, req) => { return context.query.page(req); },
sort: (context, req) => { return context.query.sort(req); },
direction: (context, req) => { return context.query.dir(req); }
direction: (context, req) => { return context.query.direction(req); }
},

/**
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/getThemesSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
params: {
sort: (context, req) => { return context.query.sort(req); },
page: (context, req) => { return context.query.page(req); },
direction: (context, req) => { return context.query.dir(req); },
direction: (context, req) => { return context.query.direction(req); },
query: (context, req) => { return context.query.query(req); }
},

Expand Down
Loading

0 comments on commit 94648cf

Please sign in to comment.