Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
chore: import fastify type for server jsdoc params
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jun 3, 2023
1 parent 1b1fd27 commit 13b1db2
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/plugins/clean-object/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function cleanObject(object = {}) {
* @author Frazer Smith
* @description Plugin that decorates Fastify instance with `cleanObject` function,
* which removes key value pairs from an object where the value is null or undefined.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
*/
async function plugin(server) {
server.decorate("cleanObject", cleanObject);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/convert-date-param-operator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function convDateParamOperator(operator) {
* @author Frazer Smith
* @description Plugin that decorates Fastify instance with `convertDateParamOperator` function,
* which convert date param operators to corresponding values.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
*/
async function plugin(server) {
server.decorate("convertDateParamOperator", convDateParamOperator);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const mssql = require("mssql");
/**
* @author Frazer Smith
* @description Decorator plugin that adds Microsoft SQL Server or PostgreSQL client.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Plugin config values.
* @param {('mssql'|'postgresql')} options.client - Database client.
* @param {string} options.connection - Database connection string.
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/hashed-bearer-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const secJSON = require("secure-json-parse");
* @author Frazer Smith
* @description Decorator plugin that adds bearer token authentication,
* querying a database for bcrypt-hashed bearer token keys.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
*/
async function plugin(server) {
await server.register(bearer, {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/shared-schemas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const S = require("fluent-json-schema");
/**
* @author Frazer Smith
* @description Plugin that adds a collection of shared schemas for re-use throughout the server.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
*/
async function plugin(server) {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin/access/bearer-token/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function buildBearerTokenRecord(result, req) {
/**
* @author Frazer Smith
* @description Sets routing options for server.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Route config values.
* @param {object} options.cors - CORS settings.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin/healthcheck/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const accepts = ["text/plain"];
* @description Sets routing options for server for healthcheck endpoint.
* Monitoring software polls this to confirm the API is running,
* so needs no authentication.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Route config values.
* @param {object} options.cors - CORS settings.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/routes/contact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function buildContact(results, req) {
/**
* @author Frazer Smith
* @description Sets routing options for server.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Route config values.
* @param {boolean=} options.bearerTokenAuthEnabled - Apply `bearerToken` security scheme to route if defined.
* @param {object} options.cors - CORS settings.
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const accepts = ["text/html"];
/**
* @author Frazer Smith
* @description Sets routing options for server.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
*/
async function route(server) {
// Register plugins
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/openapi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const accepts = docsOpenapiGetSchema.produces;
/**
* @author Frazer Smith
* @description Sets routing options for server.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Route config values.
* @param {object} options.cors - CORS settings.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const sharedSchemas = require("./plugins/shared-schemas");
/**
* @author Frazer Smith
* @description Builds Fastify instance.
* @param {object} server - Fastify instance.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} config - Fastify configuration values.
*/
async function plugin(server, config) {
Expand Down

0 comments on commit 13b1db2

Please sign in to comment.