Minor fixes (#9)

This commit is contained in:
Niklas Fondberg
2021-08-12 10:40:42 +02:00
committed by GitHub
parent d17df41d86
commit 7047fe9851
5 changed files with 21 additions and 9 deletions
+3 -2
View File
@@ -135,9 +135,10 @@ const verifyToken = async (
if (claim.token_use === 'access') { if (claim.token_use === 'access') {
// Access token, check for scopes // Access token, check for scopes
const accessClaim = claim as AccessTokenClaim; const accessClaim = claim as AccessTokenClaim;
console.debug(`accessClaim confirmed for ${accessClaim.username}`); const who = accessClaim.username ?? accessClaim.client_id;
console.debug(`accessClaim confirmed for ${who}`);
return { return {
userName: accessClaim.username, userName: who,
isValid: true, isValid: true,
idToken: null, idToken: null,
accessToken: accessClaim, accessToken: accessClaim,
+2 -3
View File
@@ -43,7 +43,7 @@ WHERE product_category.product_id = ?
/** /**
* TODO: should we have these? * TODO: should we have these?
* category keywords and texts * category keywords
* *
SELECT category_keyword.category_id, keywords.value SELECT category_keyword.category_id, keywords.value
FROM category_keyword FROM category_keyword
@@ -52,8 +52,7 @@ WHERE product_category.product_id = ?
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
* *
* category texts * category texts
SELECT name, SELECT name, text
text
FROM categorydata cd FROM categorydata cd
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
WHERE category_id = ? WHERE category_id = ?
+1
View File
@@ -3,6 +3,7 @@ import { Market } from '../types/market-types';
const MINUTE = 60; const MINUTE = 60;
// TODO: perhaps rename to MarketLocale API and add market_locales and locales here.
export class MarketAPI extends SQLDataSource { export class MarketAPI extends SQLDataSource {
constructor(config) { constructor(config) {
super(config); super(config);
+6
View File
@@ -132,6 +132,9 @@ const typeDefs = gql`
customerEmail: String customerEmail: String
customerCellphone: String customerCellphone: String
flyerIds: String flyerIds: String
"""
marketName and localeName will go away and be replaced with real objects
"""
marketName: String marketName: String
localeName: String localeName: String
billingInformation: ContactInformation billingInformation: ContactInformation
@@ -139,6 +142,9 @@ const typeDefs = gql`
billingAddressId: Int billingAddressId: Int
deliveryAddressId: Int deliveryAddressId: Int
rows: [OrderRow] rows: [OrderRow]
"""
pwinty needs to be updated with market being a subtype
"""
market: Market market: Market
} }
+5
View File
@@ -85,6 +85,11 @@ export interface ProductFields {
printFileWidth?: number; printFileWidth?: number;
printFileHeight?: number; printFileHeight?: number;
printFileDpi?: number; printFileDpi?: number;
// Below exists for Canvas frame in DB but in shop limits.php is used
// minHeight: number;
// minWidth: number;
// maxHeight: number;
// maxWidth: number;
} }
export function getProductGroupStringFromString(group: string): string { export function getProductGroupStringFromString(group: string): string {