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') {
// Access token, check for scopes
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 {
userName: accessClaim.username,
userName: who,
isValid: true,
idToken: null,
accessToken: accessClaim,
+6 -7
View File
@@ -43,7 +43,7 @@ WHERE product_category.product_id = ?
/**
* TODO: should we have these?
* category keywords and texts
* category keywords
*
SELECT category_keyword.category_id, keywords.value
FROM category_keyword
@@ -52,12 +52,11 @@ WHERE product_category.product_id = ?
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
*
* category texts
SELECT name,
text
FROM categorydata cd
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
WHERE category_id = ?
AND locale_id = ?;
SELECT name, text
FROM categorydata cd
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
WHERE category_id = ?
AND locale_id = ?;
* category teaser images???
+1
View File
@@ -3,6 +3,7 @@ import { Market } from '../types/market-types';
const MINUTE = 60;
// TODO: perhaps rename to MarketLocale API and add market_locales and locales here.
export class MarketAPI extends SQLDataSource {
constructor(config) {
super(config);
+6
View File
@@ -132,6 +132,9 @@ const typeDefs = gql`
customerEmail: String
customerCellphone: String
flyerIds: String
"""
marketName and localeName will go away and be replaced with real objects
"""
marketName: String
localeName: String
billingInformation: ContactInformation
@@ -139,6 +142,9 @@ const typeDefs = gql`
billingAddressId: Int
deliveryAddressId: Int
rows: [OrderRow]
"""
pwinty needs to be updated with market being a subtype
"""
market: Market
}
+5
View File
@@ -85,6 +85,11 @@ export interface ProductFields {
printFileWidth?: number;
printFileHeight?: 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 {