Create apps without authentication(#2025)
This commit is contained in:
		
							parent
							
								
									b9fc0e6d71
								
							
						
					
					
						commit
						fda1ab3e05
					
				
					 3 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -13,7 +13,7 @@ export default App;
 | 
			
		|||
export type IApp = {
 | 
			
		||||
	_id: mongo.ObjectID;
 | 
			
		||||
	createdAt: Date;
 | 
			
		||||
	userId: mongo.ObjectID;
 | 
			
		||||
	userId: mongo.ObjectID | null;
 | 
			
		||||
	secret: string;
 | 
			
		||||
	name: string;
 | 
			
		||||
	nameId: string;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ import App, { isValidNameId, pack } from '../../../../models/app';
 | 
			
		|||
import { ILocalUser } from '../../../../models/user';
 | 
			
		||||
 | 
			
		||||
export const meta = {
 | 
			
		||||
	requireCredential: true
 | 
			
		||||
	requireCredential: false
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ export default async (params: any, user: ILocalUser) => new Promise(async (res,
 | 
			
		|||
	// Create account
 | 
			
		||||
	const app = await App.insert({
 | 
			
		||||
		createdAt: new Date(),
 | 
			
		||||
		userId: user._id,
 | 
			
		||||
		userId: user && user._id,
 | 
			
		||||
		name: name,
 | 
			
		||||
		nameId: nameId,
 | 
			
		||||
		nameIdLower: nameId.toLowerCase(),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue