1.0.2 • Published 7 years ago
ore-fol-codes
Code variables for ore-fol.com
Installation
$ npm install ore-fol-codes --save
Usage
'use strict'
const { UserRoleCodes } = require('@ore-fol/codes')
{
const isAdmin = (user) => UserRoleCodes.ADMIN === user && user.roleCode
/* ... */
}
Values
ActivityTypeCodes
Key | Value |
---|
THREAD_CREATE_ACTIVITY | thread:create |
THREAD_UPDATE_ACTIVITY | thread:update |
THREAD_DESTROY_ACTIVITY | thread:destroy |
POST_CREATE_ACTIVITY | post:create |
POST_UPDATE_ACTIVITY | post:update |
POST_DESTROY_ACTIVITY | post:destroy |
BanPutterTypeCodes
Key | Value |
---|
THREAD_OWNER | putter:thread-owner |
SYSTEM_OPERATOR | putter:system-operator |
BanTargetTypeCodes
Key | Value |
---|
POST | ban:post |
THREAD | ban:thread |
USER | ban:user |
COMMENT | ban:comment |
BanTypeCodes
Key | Value |
---|
WRONG_THREAD_BAN | ban:wrong_thread |
VIOLATION_BAN | ban:violation |
INAPPROPRIATE_BAN | ban:inappropriate |
OTHER_REASON_BAN | ban:other_reason |
CrawlTypeCodes
Key | Value |
---|
NICHAN | crawl:nichan |
NewsTypeCodes
Key | Value |
---|
THREAD_CREATE_NEWS | news:thread-create |
THREAD_UPDATE_NEWS | news:thread-update |
THREAD_DESTROY_NEWS | news:thread-destroy |
THREAD_TAG_NEWS | news:thread-tag |
THREAD_BAN_NEWS | news:thread-ban |
POST_CREATE_NEWS | news:post-create |
POST_UPDATE_NEWS | news:post-update |
POST_DESTROY_NEWS | news:post-destroy |
POST_STAR_NEWS | news:post-star |
POST_BAN_NEWS | news:post-ban |
POST_TAG_NEWS | news:post-tag |
PostTypeCodes
Key | Value |
---|
UPLOAD_POST | post:upload |
LINK_POST | post:link |
CRAWL_POST | post:crawl |
ReportTargetTypeCodes
Key | Value |
---|
POST | report:post |
THREAD | report:thread |
COMMENT | report:comment |
USER | report:user |
ReportTypeCodes
Key | Value |
---|
POST_INAPPROPRIATE | post:inappropriate |
POST_VIOLATION | post:violation |
POST_WRONG_THREAD | post:wrong_thread |
POST_OTHER_REASON | post:other_reason |
StarTargetTypeCodes
Key | Value |
---|
POST | star:post |
THREAD | star:thread |
TagTargetTypeCodes
Key | Value |
---|
POST | tag:post |
THREAD | tag:thread |
ThreadColorCodes
Key | Value |
---|
COLOR_A | #e74c3c |
COLOR_B | #e67e22 |
COLOR_C | #f1c40f |
COLOR_D | #2ecc71 |
COLOR_E | #1abc9c |
COLOR_F | #3498db |
COLOR_G | #9b59b6 |
COLOR_H | #34495e |
COLOR_I | #95a5a6 |
COLOR_J | #ecf0f1 |
COLOR_K | #c0392b |
COLOR_L | #d35400 |
COLOR_M | #f39c12 |
COLOR_N | #27ae60 |
COLOR_O | #16a085 |
COLOR_P | #2980b9 |
COLOR_Q | #8e44ad |
COLOR_R | #2c3e50 |
COLOR_S | #7f8c8d |
COLOR_T | #bdc3c7 |
UserRoleCodes
Key | Value |
---|
NONE | NONE |
ADMIN | ADMIN |
License
This software is released under the MIT License.
Links