mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-06 07:54:21 +01:00
Merge branch 'dev' into feature/tournament-pages
This commit is contained in:
@@ -305,6 +305,7 @@ export interface NexusGenObjects {
|
||||
payment_request: string; // String!
|
||||
}
|
||||
WalletKey: { // root type
|
||||
is_current: boolean; // Boolean!
|
||||
key: string; // String!
|
||||
name: string; // String!
|
||||
}
|
||||
@@ -611,6 +612,7 @@ export interface NexusGenFieldTypes {
|
||||
payment_request: string; // String!
|
||||
}
|
||||
WalletKey: { // field return type
|
||||
is_current: boolean; // Boolean!
|
||||
key: string; // String!
|
||||
name: string; // String!
|
||||
}
|
||||
@@ -935,6 +937,7 @@ export interface NexusGenFieldTypeNames {
|
||||
payment_request: 'String'
|
||||
}
|
||||
WalletKey: { // field return type name
|
||||
is_current: 'Boolean'
|
||||
key: 'String'
|
||||
name: 'String'
|
||||
}
|
||||
|
||||
@@ -425,6 +425,7 @@ type Vote {
|
||||
}
|
||||
|
||||
type WalletKey {
|
||||
is_current: Boolean!
|
||||
key: String!
|
||||
name: String!
|
||||
}
|
||||
@@ -171,9 +171,9 @@ const MyProfile = objectType({
|
||||
|
||||
t.nonNull.list.nonNull.field('walletsKeys', {
|
||||
type: "WalletKey",
|
||||
resolve: (parent) => {
|
||||
return prisma.user.findUnique({ where: { id: parent.id } }).userKeys();
|
||||
|
||||
resolve: async (parent, _, context) => {
|
||||
const userKeys = await prisma.user.findUnique({ where: { id: parent.id } }).userKeys();
|
||||
return userKeys.map(k => ({ ...k, is_current: k.key === context.userPubKey }))
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -283,6 +283,7 @@ const WalletKey = objectType({
|
||||
definition(t) {
|
||||
t.nonNull.string('key');
|
||||
t.nonNull.string('name');
|
||||
t.nonNull.boolean('is_current')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ const { getDirectUploadUrl } = require('../../services/imageUpload.service')
|
||||
const { prisma } = require('../../prisma')
|
||||
|
||||
const postUploadImageUrl = async (req, res) => {
|
||||
|
||||
return res.status(404).send("This api is in progress");
|
||||
|
||||
const userPubKey = await extractKeyFromCookie(req.headers.cookie ?? req.headers.Cookie)
|
||||
const user = await getUserByPubKey(userPubKey)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user