Skip to content

Commit

Permalink
chore: topics/k1ch/POST-personas/minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
k1ch committed Dec 26, 2023
1 parent 7a0ff72 commit 4d35b8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion database/knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const env = require('./database-env')
module.exports = {
client: 'pg',
connection: env.PGURI,
searchPath: [env.PGSCHEMA],
searchPath: [env.PGSCHEMA, 'public'],
migrations: {
tableName: 'knex_migrations',
schemaName: env.PGSCHEMA
Expand Down
4 changes: 2 additions & 2 deletions database/layer/admin-persona.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { PGPool } = require('./pg_pool')
const pool = new PGPool()
const { usherDb } = require('../../database/layer/knex')
const { usherDb } = require('./knex')
const { pgErrorHandler } = require('../utils/pgErrorHandler')

const insertPersona = async (tenantName, issClaim, subClaim, userContext) => {
Expand Down Expand Up @@ -66,7 +66,7 @@ const insertPersonaByTenantKey = async (tenantKey, subClaim, userContext = '') =
try {
const [persona] = await usherDb('personas')
.insert({ tenantkey: tenantKey, sub_claim: subClaim, user_context: userContext })
.returning('*')
.returning(['key', 'sub_claim', 'tenantkey', 'user_context', 'created_at'])
return persona
} catch (err) {
throw pgErrorHandler(err)
Expand Down
6 changes: 2 additions & 4 deletions server/the-usher-openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,6 @@ components:
- client_id: client-app2
clientname: Client Application 2

# PERSONAS
#---------------------
Persona:
type: object
properties:
Expand Down Expand Up @@ -1057,14 +1055,14 @@ components:
message: Not Found

Conflict:
description: Resource already exist
description: Resource already exists
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 409
message: Resource already exist!
message: Resource already exists!

UnsupportedMediaType:
description: The request entity has a media type which the server or resource does not support
Expand Down

0 comments on commit 4d35b8a

Please sign in to comment.