feat: storage extra metadata + user search fix
This commit is contained in:
@@ -11,14 +11,14 @@ module.exports = {
|
||||
UserQuery: {
|
||||
async list(obj, args, context, info) {
|
||||
return WIKI.models.users.query()
|
||||
.select('id', 'email', 'name', 'provider', 'role', 'createdAt', 'updatedAt')
|
||||
.select('id', 'email', 'name', 'providerKey', 'role', 'createdAt', 'updatedAt')
|
||||
},
|
||||
async search(obj, args, context, info) {
|
||||
return WIKI.models.users.query()
|
||||
.where('email', 'like', `%${args.query}%`)
|
||||
.orWhere('name', 'like', `%${args.query}%`)
|
||||
.limit(10)
|
||||
.select('id', 'email', 'name', 'provider', 'role', 'createdAt', 'updatedAt')
|
||||
.select('id', 'email', 'name', 'providerKey', 'role', 'createdAt', 'updatedAt')
|
||||
},
|
||||
async single(obj, args, context, info) {
|
||||
let usr = await WIKI.models.users.query().findById(args.id)
|
||||
|
@@ -39,6 +39,9 @@ type StorageTarget {
|
||||
isEnabled: Boolean!
|
||||
key: String!
|
||||
title: String!
|
||||
description: String
|
||||
logo: String
|
||||
website: String
|
||||
mode: String
|
||||
config: [KeyValuePair]
|
||||
}
|
||||
|
@@ -85,14 +85,14 @@ type UserMinimal {
|
||||
id: Int!
|
||||
name: String!
|
||||
email: String!
|
||||
provider: String!
|
||||
providerKey: String!
|
||||
}
|
||||
|
||||
type User {
|
||||
id: Int!
|
||||
name: String!
|
||||
email: String!
|
||||
provider: String!
|
||||
providerKey: String!
|
||||
providerId: String
|
||||
role: UserRole!
|
||||
createdAt: Date!
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: azure
|
||||
title: Azure Blob Storage
|
||||
description: Azure Blob Storage by Microsoft provides massively scalable object storage for unstructured data.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/azure.svg
|
||||
website: https://azure.microsoft.com/services/storage/blobs/
|
||||
props:
|
||||
accountName: String
|
||||
accountKey: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: box
|
||||
title: Box
|
||||
description: Box is a cloud content management and file sharing service for businesses.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/box.svg
|
||||
website: https://www.box.com/platform
|
||||
props:
|
||||
clientId: String
|
||||
clientSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: digitalocean
|
||||
title: DigialOcean Spaces
|
||||
title: DigitalOcean Spaces
|
||||
description: DigitalOcean provides developers and businesses a reliable, easy-to-use cloud computing platform of virtual servers (Droplets), object storage (Spaces) and more.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/digitalocean.svg
|
||||
website: https://www.digitalocean.com/products/spaces/
|
||||
props:
|
||||
accessKeyId: String
|
||||
accessSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: disk
|
||||
title: Local File System
|
||||
description: Local storage on disk or network shares.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/local-fs.svg
|
||||
website: https://wiki.js.org
|
||||
props:
|
||||
path:
|
||||
type: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: dropbox
|
||||
title: Dropbox
|
||||
description: Dropbox is a file hosting service that offers cloud storage, file synchronization, personal cloud, and client software.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/dropbox.svg
|
||||
website: https://dropbox.com
|
||||
props:
|
||||
appKey: String
|
||||
appSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: gdrive
|
||||
title: Google Drive
|
||||
description: Google Drive is a file storage and synchronization service developed by Google.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/google-drive.svg
|
||||
website: https://www.google.com/drive/
|
||||
props:
|
||||
clientId: String
|
||||
clientSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: git
|
||||
title: Git
|
||||
description: Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/git-alt.svg
|
||||
website: https://git-scm.com/
|
||||
props:
|
||||
authType:
|
||||
type: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: onedrive
|
||||
title: OneDrive
|
||||
description: OneDrive is a file hosting service operated by Microsoft as part of its suite of Office Online services.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/onedrive.svg
|
||||
website: https://onedrive.live.com/about/
|
||||
props:
|
||||
clientId: String
|
||||
clientSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: s3
|
||||
title: Amazon S3
|
||||
description: Amazon S3 is a cloud computing web service offered by Amazon Web Services which provides object storage.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/aws-s3.svg
|
||||
website: https://aws.amazon.com/s3/
|
||||
props:
|
||||
accessKeyId: String
|
||||
accessSecret: String
|
||||
|
@@ -1,6 +1,9 @@
|
||||
key: scp
|
||||
title: SCP (SSH)
|
||||
description: SSH is a software package that enables secure system administration and file transfers over insecure networks.
|
||||
author: requarks.io
|
||||
logo: https://static.requarks.io/logo/ssh.svg
|
||||
website: https://www.ssh.com/ssh/
|
||||
props:
|
||||
host: String
|
||||
port:
|
||||
|
Reference in New Issue
Block a user