chore(api): remove unused code and endpoints (#41332)
This commit is contained in:
committed by
GitHub
parent
fa6b11f359
commit
cd40d47363
@@ -1,9 +0,0 @@
|
||||
import { Observable } from 'rx';
|
||||
|
||||
module.exports = function(Article) {
|
||||
Article.on('dataSourceAttached', () => {
|
||||
Article.findOne$ = Observable.fromNodeCallback(Article.findOne, Article);
|
||||
Article.findById$ = Observable.fromNodeCallback(Article.findById, Article);
|
||||
Article.find$ = Observable.fromNodeCallback(Article.find, Article);
|
||||
});
|
||||
};
|
||||
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"name": "article",
|
||||
"plural": "articles",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"options": {
|
||||
"validateUpsert": true
|
||||
},
|
||||
"properties": {
|
||||
"shortId": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"slugPart": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "A kebab-case-string created from the title, will have the shortId appended to it"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "A place to keep the referral link and read time"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"author": {
|
||||
"type": "object",
|
||||
"required": true
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"featureImage": {
|
||||
"type": "object"
|
||||
},
|
||||
"draft": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"renderableContent": {
|
||||
"type": "string"
|
||||
},
|
||||
"youtubeId": {
|
||||
"type": "string",
|
||||
"description": "A youtube video id eg: 'EErY9zXGLNU'"
|
||||
},
|
||||
"published": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"default": false
|
||||
},
|
||||
"featured": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"default": false
|
||||
},
|
||||
"underReview": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"default": false
|
||||
},
|
||||
"viewCount": {
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"default": 1
|
||||
},
|
||||
"firstPublishedDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"createdDate": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
},
|
||||
"lastEditedDate": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
},
|
||||
"history": {
|
||||
"type": [
|
||||
"object"
|
||||
],
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "user",
|
||||
"foreignKey": "externalId"
|
||||
},
|
||||
"popularity": {
|
||||
"type": "hasOne",
|
||||
"model": "popularity",
|
||||
"foreignKey": "popularityId"
|
||||
}
|
||||
},
|
||||
"acls": [],
|
||||
"methods": {}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"name": "nonprofit",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"trackChanges": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"id": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"index": {
|
||||
"mongodb": {
|
||||
"unique": true,
|
||||
"background": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"whatDoesNonprofitDo": {
|
||||
"type": "string"
|
||||
},
|
||||
"websiteLink": {
|
||||
"type": "string"
|
||||
},
|
||||
"endUser": {
|
||||
"type": "string"
|
||||
},
|
||||
"approvedDeliverables": {
|
||||
"type": "array"
|
||||
},
|
||||
"projectDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"logoUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"imageUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"estimatedHours": {
|
||||
"type": "number"
|
||||
},
|
||||
"moneySaved": {
|
||||
"type": "number"
|
||||
},
|
||||
"currentStatus": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "DENY"
|
||||
},
|
||||
{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
],
|
||||
"methods": {}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"name": "pledge",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"trackChanges": false,
|
||||
"properties": {
|
||||
"nonprofit": {
|
||||
"type": "string",
|
||||
"index": true
|
||||
},
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"dateStarted": {
|
||||
"type": "date",
|
||||
"defaultFn": "now"
|
||||
},
|
||||
"dateEnded": {
|
||||
"type": "date"
|
||||
},
|
||||
"formerUserId": {
|
||||
"type": "string"
|
||||
},
|
||||
"isOrphaned": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isCompleted": {
|
||||
"type": "boolean",
|
||||
"default": "false"
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "hasMany",
|
||||
"model": "user",
|
||||
"foreignKey": "userId"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "DENY"
|
||||
},
|
||||
{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
],
|
||||
"methods": {}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Observable } from 'rx';
|
||||
|
||||
module.exports = function(Popularity) {
|
||||
Popularity.on('dataSourceAttached', () => {
|
||||
Popularity.findOne$ = Observable.fromNodeCallback(
|
||||
Popularity.findOne,
|
||||
Popularity
|
||||
);
|
||||
Popularity.findById$ = Observable.fromNodeCallback(
|
||||
Popularity.findById,
|
||||
Popularity
|
||||
);
|
||||
Popularity.find$ = Observable.fromNodeCallback(Popularity.find, Popularity);
|
||||
});
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": "popularity",
|
||||
"plural": "popularities",
|
||||
"base": "PersistedModel",
|
||||
"idInjection": true,
|
||||
"options": {
|
||||
"validateUpsert": true
|
||||
},
|
||||
"properties": {
|
||||
"events": {
|
||||
"type": [
|
||||
"object"
|
||||
],
|
||||
"required": true,
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"article": {
|
||||
"type": "belongsTo",
|
||||
"model": "article",
|
||||
"foreignKey": "articleId"
|
||||
}
|
||||
},
|
||||
"acls": [],
|
||||
"methods": {}
|
||||
}
|
||||
Reference in New Issue
Block a user