Merge pull request #2188 from Tosuke/patch1
Create apps without authentication(#2025)
This commit is contained in:
commit
23b0723168
@ -145,6 +145,7 @@
|
|||||||
"koa-slow": "2.1.0",
|
"koa-slow": "2.1.0",
|
||||||
"koa-views": "6.1.4",
|
"koa-views": "6.1.4",
|
||||||
"loader-utils": "1.1.0",
|
"loader-utils": "1.1.0",
|
||||||
|
"lodash.assign": "4.2.0",
|
||||||
"mecab-async": "0.1.2",
|
"mecab-async": "0.1.2",
|
||||||
"minio": "6.0.0",
|
"minio": "6.0.0",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
|
@ -13,7 +13,7 @@ export default App;
|
|||||||
export type IApp = {
|
export type IApp = {
|
||||||
_id: mongo.ObjectID;
|
_id: mongo.ObjectID;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
userId: mongo.ObjectID;
|
userId: mongo.ObjectID | null;
|
||||||
secret: string;
|
secret: string;
|
||||||
name: string;
|
name: string;
|
||||||
nameId: string;
|
nameId: string;
|
||||||
|
@ -4,7 +4,7 @@ import App, { isValidNameId, pack } from '../../../../models/app';
|
|||||||
import { ILocalUser } from '../../../../models/user';
|
import { ILocalUser } from '../../../../models/user';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true
|
requireCredential: false
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,7 +38,7 @@ export default async (params: any, user: ILocalUser) => new Promise(async (res,
|
|||||||
// Create account
|
// Create account
|
||||||
const app = await App.insert({
|
const app = await App.insert({
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
userId: user._id,
|
userId: user && user._id,
|
||||||
name: name,
|
name: name,
|
||||||
nameId: nameId,
|
nameId: nameId,
|
||||||
nameIdLower: nameId.toLowerCase(),
|
nameIdLower: nameId.toLowerCase(),
|
||||||
|
Loading…
Reference in New Issue
Block a user