Ver Fonte

Merge pull request #603 from jsoref/spelling

Spelling
Pouria Ezzati há 3 anos atrás
pai
commit
96dc5d15ba

+ 1 - 1
README.md

@@ -120,7 +120,7 @@ Download Kutt's official workflow for [Alfred](https://www.alfredapp.com/) app f
 | Rust       | [urlshortener](https://github.com/vityafx/urlshortener-rs)                        | URL shortener library written in Rust              |
 | Rust       | [kutt-rs](https://github.com/robatipoor/kutt-rs)                                  | Command line tool written in Rust                  |
 | Node.js    | [node-kutt](https://github.com/ardalanamini/node-kutt)                            | Node.js client for Kutt.it url shortener           |
-| JavaScript | [kutt-vscode](https://github.com/mehrad77/kutt-vscode)                            | Visual Studio Code extention for Kutt              |
+| JavaScript | [kutt-vscode](https://github.com/mehrad77/kutt-vscode)                            | Visual Studio Code extension for Kutt              |
 | Java       | [kutt-desktop](https://github.com/cipher812/kutt-desktop)                         | A Cross platform Java desktop application for Kutt |
 | Go         | [kutt-go](https://github.com/raahii/kutt-go)                                      | Go client for Kutt.it url shortener                |
 | BASH       | [GitHub Gist](https://gist.github.com/hashworks/6d6e4eae8984a5018f7692a796d570b4) | Simple BASH function to access the API             |

+ 1 - 1
client/components/Settings/SettingsApi.tsx

@@ -49,7 +49,7 @@ const SettingsApi: FC = () => {
       </H2>
       <Text mb={4}>
         In additional to this website, you can use the API to create, delete and
-        get shortend URLs. If
+        get shortened URLs. If
         {" you're"} not familiar with API, {"don't"} generate the key. DO NOT
         share this key on the client side of your website.{" "}
         <ALink href="https://docs.kutt.it" title="API Docs" target="_blank">

+ 1 - 1
client/components/Settings/SettingsChangeEmail.tsx

@@ -78,7 +78,7 @@ const SettingsChangeEmail: FC = () => {
             </Text>
             <TextInput
               {...email("changeemailaddress")}
-              placeholder="john@examaple.com"
+              placeholder="john@example.com"
               flex="1 1 auto"
               maxWidth="240px"
             />

+ 3 - 3
server/__v1/controllers/linkController.ts

@@ -118,8 +118,8 @@ export const shortener: Handler = async (req, res) => {
 
 export const goToLink: Handler = async (req, res, next) => {
   const host = removeWww(req.headers.host);
-  const reqestedId = req.params.id || req.body.id;
-  const address = reqestedId.replace("+", "");
+  const requestedId = req.params.id || req.body.id;
+  const address = requestedId.replace("+", "");
   const customDomain = host !== env.DEFAULT_DOMAIN && host;
   const isBot = isbot(req.headers["user-agent"]);
 
@@ -142,7 +142,7 @@ export const goToLink: Handler = async (req, res, next) => {
     return res.redirect("/banned");
   }
 
-  const doesRequestInfo = /.*\+$/gi.test(reqestedId);
+  const doesRequestInfo = /.*\+$/gi.test(requestedId);
   if (doesRequestInfo && !link.password) {
     req.linkTarget = link.target;
     req.pageType = "info";

+ 1 - 1
server/handlers/links.ts

@@ -279,7 +279,7 @@ export const redirect = (app: ReturnType<typeof next>): Handler => async (
   });
 
   // 3. When no link, if has domain redirect to domain's homepage
-  // otherwise rediredt to 404
+  // otherwise redirect to 404
   if (!link) {
     return res.redirect(301, domain ? domain.homepage : "/404");
   }

+ 2 - 2
server/migration/02_users.ts

@@ -1,10 +1,10 @@
 import env from "../env";
 
 import { v1 as NEO4J } from "neo4j-driver";
-import PQuque from "p-queue";
+import PQueue from "p-queue";
 import knex from "knex";
 
-const queue = new PQuque({ concurrency: 10 });
+const queue = new PQueue({ concurrency: 10 });
 
 // 1. Connect to Neo4j database
 const neo4j = NEO4J.driver(

+ 2 - 2
server/passport.ts

@@ -1,6 +1,6 @@
 import { Strategy as LocalAPIKeyStrategy } from "passport-localapikey-update";
 import { Strategy as JwtStrategy, ExtractJwt } from "passport-jwt";
-import { Strategy as LocalStratergy } from "passport-local";
+import { Strategy as LocalStrategy } from "passport-local";
 import passport from "passport";
 import bcrypt from "bcryptjs";
 
@@ -29,7 +29,7 @@ const localOptions = {
 };
 
 passport.use(
-  new LocalStratergy(localOptions, async (email, password, done) => {
+  new LocalStrategy(localOptions, async (email, password, done) => {
     try {
       const user = await query.user.find({ email });
       if (!user) {

+ 1 - 1
server/queries/link.ts

@@ -194,7 +194,7 @@ export const update = async (match: Partial<Link>, update: Partial<Link>) => {
   return links;
 };
 
-export const increamentVisit = async (match: Partial<Link>) => {
+export const incrementVisit = async (match: Partial<Link>) => {
   return knex<Link>("links")
     .where(match)
     .increment("visit_count", 1);

+ 1 - 1
server/queues/visit.ts

@@ -15,7 +15,7 @@ const filterInOs = agent => item =>
 export default function({ data }) {
   const tasks = [];
 
-  tasks.push(query.link.increamentVisit({ id: data.link.id }));
+  tasks.push(query.link.incrementVisit({ id: data.link.id }));
 
   if (data.link.visit_count < getStatsLimit()) {
     const agent = useragent.parse(data.headers["user-agent"]);