repo stringlengths 4 140 | commit_id stringlengths 7 7 | rel_path stringlengths 1 3.5k | language stringclasses 37
values | url stringlengths 37 3.56k | raw_url stringlengths 54 3.58k | key stringlengths 20 3.54k | ok bool 1
class | status int64 200 200 | bytes int64 48 425k | content stringlengths 40 425k | worker_id int64 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|
DanielSan1990/Citas-Front-Angular | 47e4eab | src/app/config/l10n-config.ts | TypeScript | www.github.com/DanielSan1990/Citas-Front-Angular/tree/main/src/app/config/l10n-config.ts | https://raw.githubusercontent.com/DanielSan1990/Citas-Front-Angular/47e4eab/src/app/config/l10n-config.ts | DanielSan1990/Citas-Front-Angular 47e4eab src/app/config/l10n-config.ts | true | 200 | 592 | import { L10nConfig, L10nLoader } from 'angular-l10n';
import { i18nAsset } from './i18n';
export const l10nConfig: L10nConfig = {
format: 'language-region',
providers: [
{ name: 'app', asset: i18nAsset }
],
cache: true,
keySeparator: '.',
defaultLocale: { language: 'es-ES'},
schem... | 0 |
diegoacosta236/mlm_comm_app | 2847955 | app/api/channels/[channelId]/route.ts | TypeScript | www.github.com/diegoacosta236/mlm_comm_app/tree/main/app/api/channels/[channelId]/route.ts | https://raw.githubusercontent.com/diegoacosta236/mlm_comm_app/2847955/app/api/channels/%5BchannelId%5D/route.ts | diegoacosta236/mlm_comm_app 2847955 app/api/channels/[channelId]/route.ts | true | 200 | 1,493 | import { NextRequest, NextResponse } from 'next/server';
import { db as prisma } from "@/lib/db";
import { currentUser } from '@/lib/current-user';
export async function GET(req: NextRequest) {
try {
const user = await currentUser();
if (!user) {
console.error('User not authenticated');
return Ne... | 7 |
JohanVacca/FAC_1 | b4fca51 | Front/src/app/shared/services/inv-center2/inv-center.service.ts | TypeScript | www.github.com/JohanVacca/FAC_1/tree/main/Front/src/app/shared/services/inv-center2/inv-center.service.ts | https://raw.githubusercontent.com/JohanVacca/FAC_1/b4fca51/Front/src/app/shared/services/inv-center2/inv-center.service.ts | JohanVacca/FAC_1 b4fca51 Front/src/app/shared/services/inv-center2/inv-center.service.ts | true | 200 | 712 | import { Injectable } from '@angular/core';
import {ApiService} from '../../../@core/services';
import {map} from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class InvCenterService {
private readonly endpoint = 'inv-center';
constructor(
private http: ApiService,
) { }
getAll() {
... | 2 |
yuki-koma2/wedding-invitation | 9789cea | invitation-nextjs/src/server/model/guest.schema.ts | TypeScript | www.github.com/yuki-koma2/wedding-invitation/tree/main/invitation-nextjs/src/server/model/guest.schema.ts | https://raw.githubusercontent.com/yuki-koma2/wedding-invitation/9789cea/invitation-nextjs/src/server/model/guest.schema.ts | yuki-koma2/wedding-invitation 9789cea invitation-nextjs/src/server/model/guest.schema.ts | true | 200 | 1,657 | import { z } from 'zod';
import { prefectureCodes } from "@/models/prefectureCode";
import japaneseErrorMap from "@/locales/zodValidationErrorMap.jp";
// custom error message
z.setErrorMap(japaneseErrorMap)
// サイド(新郎側・新婦側)のEnum
export const SideEnum = z.enum(['GROOM', 'BRIDE']);
// 出欠ステータスのEnum
export const Attendan... | 5 |
ArtisAdemi/next-app | 9b4f669 | server/middleware/checkRole.ts | TypeScript | www.github.com/ArtisAdemi/next-app/tree/main/server/middleware/checkRole.ts | https://raw.githubusercontent.com/ArtisAdemi/next-app/9b4f669/server/middleware/checkRole.ts | ArtisAdemi/next-app 9b4f669 server/middleware/checkRole.ts | true | 200 | 357 | import { Request, Response, NextFunction } from 'express';
export function checkRole(role: string) {
return (req: Request, res: Response, next: NextFunction) => {
const user = req.user;
if (user && user.role === role) {
next();
} else {
res.status(403).json({ message... | 4 |
gamayunov10/instagram-api | 39b8bd7 | apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-success-registration-message.use-case.ts | TypeScript | www.github.com/gamayunov10/instagram-api/tree/main/apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-success-registration-message.use-case.ts | https://raw.githubusercontent.com/gamayunov10/instagram-api/39b8bd7/apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-success-registration-message.use-case.ts | gamayunov10/instagram-api 39b8bd7 apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-success-registration-message.use-case.ts | true | 200 | 1,080 | import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { MailerService } from '@nestjs-modules/mailer';
import { ConfigService } from '@nestjs/config';
import { NodeEnv } from '../../../../../base/enums/node-env.enum';
export class SendSuccessRegistrationCommand {
constructor(
public username: s... | 0 |
future4code/guimaraes-Caio-Ramos | 35f3aec | modulo5/filtros-ordenacao-paginacao/src/endpoints/getUsersByType.ts | TypeScript | www.github.com/future4code/guimaraes-Caio-Ramos/tree/main/modulo5/filtros-ordenacao-paginacao/src/endpoints/getUsersByType.ts | https://raw.githubusercontent.com/future4code/guimaraes-Caio-Ramos/35f3aec/modulo5/filtros-ordenacao-paginacao/src/endpoints/getUsersByType.ts | future4code/guimaraes-Caio-Ramos 35f3aec modulo5/filtros-ordenacao-paginacao/src/endpoints/getUsersByType.ts | true | 200 | 679 | import express, { Request, Response } from "express";
import cors from "cors";
import { AddressInfo } from "net";
import { connection } from "../data/connection";
//import { user } from "../types";
export const getUsersByType = async (req: Request, res: Response) => {
let errorCode = 500;
let { type } = req.params... | 3 |
future4code/freire-Guilherme-Beutler | 9519f0b | modulo4/projeto-labecommerce/src/endpoints/getAllProducts.ts | TypeScript | www.github.com/future4code/freire-Guilherme-Beutler/tree/main/modulo4/projeto-labecommerce/src/endpoints/getAllProducts.ts | https://raw.githubusercontent.com/future4code/freire-Guilherme-Beutler/9519f0b/modulo4/projeto-labecommerce/src/endpoints/getAllProducts.ts | future4code/freire-Guilherme-Beutler 9519f0b modulo4/projeto-labecommerce/src/endpoints/getAllProducts.ts | true | 200 | 498 | import { Request, Response } from "express";
import selectAllProducts from "../data/selectAllProducts";
export default async function getAllUsers(req: Request, res: Response) {
try {
const allProducts = await selectAllProducts()
if (!allProducts?.length) {
throw new Error('Não exis... | 1 |
mikhailmatyasov/portfolio | 49287a0 | wesafe.net/WeSafe.WebApi.Light/ClientApp/src/app/components/dashboard/dashboard.component.ts | TypeScript | www.github.com/mikhailmatyasov/portfolio/tree/main/wesafe.net/WeSafe.WebApi.Light/ClientApp/src/app/components/dashboard/dashboard.component.ts | https://raw.githubusercontent.com/mikhailmatyasov/portfolio/49287a0/wesafe.net/WeSafe.WebApi.Light/ClientApp/src/app/components/dashboard/dashboard.component.ts | mikhailmatyasov/portfolio 49287a0 wesafe.net/WeSafe.WebApi.Light/ClientApp/src/app/components/dashboard/dashboard.component.ts | true | 200 | 2,718 | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { DeviceIndicatorsService } from '../../services/device-indicators.service';
import { IDeviceIndicators } from '../../models/device-indicators';
import { PrivateClientService } from '../../services/private-client... | 7 |
nayandeep-shrestha/e-mart | 30d9c79 | emart-backend/src/models/offers.model.ts | TypeScript | www.github.com/nayandeep-shrestha/e-mart/tree/main/emart-backend/src/models/offers.model.ts | https://raw.githubusercontent.com/nayandeep-shrestha/e-mart/30d9c79/emart-backend/src/models/offers.model.ts | nayandeep-shrestha/e-mart 30d9c79 emart-backend/src/models/offers.model.ts | true | 200 | 270 | export interface Offers{
id: number,
name: string,
image: string | null,
usersId: number,
createdAt: Date;
updatedAt: Date;
}
export type OfferCreatePayload = Pick<Offers, 'name'>
export type OfferResponse = Pick<Offers, 'id' | 'name' | 'image'> | 2 |
Davidaprilio/polling-api | b43ee59 | src/misc/env.ts | TypeScript | www.github.com/Davidaprilio/polling-api/tree/main/src/misc/env.ts | https://raw.githubusercontent.com/Davidaprilio/polling-api/b43ee59/src/misc/env.ts | Davidaprilio/polling-api b43ee59 src/misc/env.ts | true | 200 | 1,335 | import { env } from "@/misc/utils"
import { JWTAlgorithm, JWTAlgorithmList } from "@/types/jwt"
const APP_ENV = env('APP_ENV', 'development') // development, production
const ENV = {
APP_PORT: env('APP_PORT', 3000),
APP_HOST: env('APP_HOST', 'http://localhost'),
APP_ENV, // development, production
APP_... | 5 |
eran-or/fullstack-demo-pizzalabs | 4789fa2 | frontend/src/services/date.ts | TypeScript | www.github.com/eran-or/fullstack-demo-pizzalabs/tree/main/frontend/src/services/date.ts | https://raw.githubusercontent.com/eran-or/fullstack-demo-pizzalabs/4789fa2/frontend/src/services/date.ts | eran-or/fullstack-demo-pizzalabs 4789fa2 frontend/src/services/date.ts | true | 200 | 427 | export const getFormatedDateTime = (d: Date)=>{
const localTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const options:Intl.DateTimeFormatOptions = {
year: "numeric",
month: "numeric",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric",
hour12: false,... | 3 |
reduce-map/nest-services-monorepo | 6795103 | apps/data-provider/src/schemas/user-credentials.schema.ts | TypeScript | www.github.com/reduce-map/nest-services-monorepo/tree/main/apps/data-provider/src/schemas/user-credentials.schema.ts | https://raw.githubusercontent.com/reduce-map/nest-services-monorepo/6795103/apps/data-provider/src/schemas/user-credentials.schema.ts | reduce-map/nest-services-monorepo 6795103 apps/data-provider/src/schemas/user-credentials.schema.ts | true | 200 | 346 | import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
@Schema({ _id: false })
export class Credentials {
@Prop({ type: String, unique: true, required: true, index: true })
login!: string;
@Prop({ type: String, required: true })
password!: string;
}
export const CredentialsSchema = SchemaFactory.cre... | 4 |
ramoncibas/store | 0ed6e3d | src/pages/Product/service/fetchProduct.ts | TypeScript | www.github.com/ramoncibas/store/tree/main/src/pages/Product/service/fetchProduct.ts | https://raw.githubusercontent.com/ramoncibas/store/0ed6e3d/src/pages/Product/service/fetchProduct.ts | ramoncibas/store 0ed6e3d src/pages/Product/service/fetchProduct.ts | true | 200 | 1,682 | import api from "utils/api";
import getAcessToken from "utils/getAcessToken";
import {
Product,
ProductAspects,
ProductById,
CustomAxiosPromise
} from "types";
const fetchProducts = (): CustomAxiosPromise<Product[]> =>
api.get("/product/all", {
headers: { Accept: "version=1", "x-access-token": getAcessTo... | 0 |
itsdavehimself/render-cove | 56be481 | server/createIndexes.ts | TypeScript | www.github.com/itsdavehimself/render-cove/tree/main/server/createIndexes.ts | https://raw.githubusercontent.com/itsdavehimself/render-cove/56be481/server/createIndexes.ts | itsdavehimself/render-cove 56be481 server/createIndexes.ts | true | 200 | 929 | import Project from './models/projectModel.js';
import User from './models/userModel.js';
const createProjectIndex = async () => {
try {
await Project.collection.createIndex(
{
title: 'text',
description: 'text',
tags: 'text',
},
{
name: 'project_text_index',
... | 1 |
Sanmov13/awesome-project | ca3762c | src/entities/Profile/model/services/updateProfileData/updateProfleData.ts | TypeScript | www.github.com/Sanmov13/awesome-project/tree/main/src/entities/Profile/model/services/updateProfileData/updateProfleData.ts | https://raw.githubusercontent.com/Sanmov13/awesome-project/ca3762c/src/entities/Profile/model/services/updateProfileData/updateProfleData.ts | Sanmov13/awesome-project ca3762c src/entities/Profile/model/services/updateProfileData/updateProfleData.ts | true | 200 | 1,126 | import { createAsyncThunk } from '@reduxjs/toolkit';
import { ThunkConfig } from 'app/providers/StoreProvider/config/StateSchema';
import { ValidateProfileData } from '../ValidateProfileData/ValidateProfileData';
import { getProfileForm } from '../../selectors/getProfileForm/getProfileForm';
import { Profile, ValidateP... | 7 |
shashank-saxena/nestjs-template | 7900d75 | src/db/mysql/user/models/user-contact.repository.ts | TypeScript | www.github.com/shashank-saxena/nestjs-template/tree/main/src/db/mysql/user/models/user-contact.repository.ts | https://raw.githubusercontent.com/shashank-saxena/nestjs-template/7900d75/src/db/mysql/user/models/user-contact.repository.ts | shashank-saxena/nestjs-template 7900d75 src/db/mysql/user/models/user-contact.repository.ts | true | 200 | 602 | /*------------------------------------------------------------------------------
Project : nest-api-server-boilerplate
Version : 0.0.1
About : ref - https://mikro-orm.io/docs/repositories
Created on : Tue May 30 2023
Author : Shashank Saxena
Copyright (c) 2023 Newput. All rights reser... | 5 |
EcoTrackPIM/nestjs | 000e330 | src/intercepteurs.ts | TypeScript | www.github.com/EcoTrackPIM/nestjs/tree/main/src/intercepteurs.ts | https://raw.githubusercontent.com/EcoTrackPIM/nestjs/000e330/src/intercepteurs.ts | EcoTrackPIM/nestjs 000e330 src/intercepteurs.ts | true | 200 | 582 | import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
@Injectable()
export class LoggingInterceptor implements NestInterceptor {
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
... | 2 |
BernaValdivieso/fintoc-integration | e7e8800 | node_modules/@aws-sdk/client-iam/dist-types/commands/DeleteUserPermissionsBoundaryCommand.d.ts | TypeScript | www.github.com/BernaValdivieso/fintoc-integration/tree/main/node_modules/@aws-sdk/client-iam/dist-types/commands/DeleteUserPermissionsBoundaryCommand.d.ts | https://raw.githubusercontent.com/BernaValdivieso/fintoc-integration/e7e8800/node_modules/%40aws-sdk/client-iam/dist-types/commands/DeleteUserPermissionsBoundaryCommand.d.ts | BernaValdivieso/fintoc-integration e7e8800 node_modules/@aws-sdk/client-iam/dist-types/commands/DeleteUserPermissionsBoundaryCommand.d.ts | true | 200 | 3,430 | import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { IAMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IAMClient";
import { DeleteUserPermissionsBoundaryRequest } from "../models/models_0";
/**
* @public
*/
ex... | 3 |
Figaarillo/noderplate | 9ad96db | src/user/aplication/usecases/save.usecase.ts | TypeScript | www.github.com/Figaarillo/noderplate/tree/main/src/user/aplication/usecases/save.usecase.ts | https://raw.githubusercontent.com/Figaarillo/noderplate/9ad96db/src/user/aplication/usecases/save.usecase.ts | Figaarillo/noderplate 9ad96db src/user/aplication/usecases/save.usecase.ts | true | 200 | 608 | import UserEntity from '@user/domain/entities/user.entity'
import type UserPayload from '@user/domain/payload/user.payload'
import type UserRepository from '@user/domain/repository/user.repository'
class SaveUserUseCase {
constructor(private readonly repository: UserRepository) {
this.repository = repository
}... | 0 |
AlexeyKapralov/social_network_backend_nest_typeorm | 036700e | src/features/auth/auth/strategies/basic-strategy.ts | TypeScript | www.github.com/AlexeyKapralov/social_network_backend_nest_typeorm/tree/main/src/features/auth/auth/strategies/basic-strategy.ts | https://raw.githubusercontent.com/AlexeyKapralov/social_network_backend_nest_typeorm/036700e/src/features/auth/auth/strategies/basic-strategy.ts | AlexeyKapralov/social_network_backend_nest_typeorm 036700e src/features/auth/auth/strategies/basic-strategy.ts | true | 200 | 916 | import { PassportStrategy } from '@nestjs/passport';
import { BasicStrategy as Strategy } from 'passport-http';
import { ConfigService } from '@nestjs/config';
import { ApiSettings } from '../../../../settings/env/api-settings';
import { Injectable, UnauthorizedException } from '@nestjs/common';
@Injectable()
export c... | 1 |
nicodidonna/check-my-car | d11ce19 | src/app/assicurazione-bollo/assicurazione-bollo.component.ts | TypeScript | www.github.com/nicodidonna/check-my-car/tree/main/src/app/assicurazione-bollo/assicurazione-bollo.component.ts | https://raw.githubusercontent.com/nicodidonna/check-my-car/d11ce19/src/app/assicurazione-bollo/assicurazione-bollo.component.ts | nicodidonna/check-my-car d11ce19 src/app/assicurazione-bollo/assicurazione-bollo.component.ts | true | 200 | 3,451 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { Assicurazione } from '../@assicurazione/class/AssicurazioneClass';
import { AssicurazioneServiceService } from '../@assicurazione/services/assicurazione-service.service';
import ... | 4 |
oumayma-benhnia/front-old | 70da0a2 | tp1/src/app/view/societes/societe-list/societe-list.component.ts | TypeScript | www.github.com/oumayma-benhnia/front-old/tree/main/tp1/src/app/view/societes/societe-list/societe-list.component.ts | https://raw.githubusercontent.com/oumayma-benhnia/front-old/70da0a2/tp1/src/app/view/societes/societe-list/societe-list.component.ts | oumayma-benhnia/front-old 70da0a2 tp1/src/app/view/societes/societe-list/societe-list.component.ts | true | 200 | 1,233 | import {Component, OnInit} from '@angular/core';
import {SocieteService} from "../../../controler/service/societe.service";
import {Societe} from "../../../controler/model/societe.model";
@Component({
selector: 'app-societe-list',
templateUrl: './societe-list.component.html',
styleUrls: ['./societe-list.componen... | 7 |
chengfengfengwang/quill-base64img-upload | 3a21f55 | vite.config.ts | TypeScript | www.github.com/chengfengfengwang/quill-base64img-upload/tree/main/vite.config.ts | https://raw.githubusercontent.com/chengfengfengwang/quill-base64img-upload/3a21f55/vite.config.ts | chengfengfengwang/quill-base64img-upload 3a21f55 vite.config.ts | true | 200 | 831 | // vite.config.js
import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, "src/main.ts"),
name: "quill-base64im... | 5 |
Informasjonsforvaltning/catalog-frontend | 36bb697 | apps/data-service-catalog/types/next-auth.d.ts | TypeScript | www.github.com/Informasjonsforvaltning/catalog-frontend/tree/main/apps/data-service-catalog/types/next-auth.d.ts | https://raw.githubusercontent.com/Informasjonsforvaltning/catalog-frontend/36bb697/apps/data-service-catalog/types/next-auth.d.ts | Informasjonsforvaltning/catalog-frontend 36bb697 apps/data-service-catalog/types/next-auth.d.ts | true | 200 | 490 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
import Session from 'next-auth';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { JWT } from 'next-auth/jwt';
declare module 'next-auth' {
interface Session {
error?: string;
accessToken?: string;
accessTokenExpiresAt?: n... | 2 |
HasanShahariar/Ecommerce-App | e344156 | src/app/modules/report/services/topup-report.service.ts | TypeScript | www.github.com/HasanShahariar/Ecommerce-App/tree/main/src/app/modules/report/services/topup-report.service.ts | https://raw.githubusercontent.com/HasanShahariar/Ecommerce-App/e344156/src/app/modules/report/services/topup-report.service.ts | HasanShahariar/Ecommerce-App e344156 src/app/modules/report/services/topup-report.service.ts | true | 200 | 1,920 | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { map, Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root',
})
export class TopupReportService {
constructor(private http: HttpClient)... | 3 |
armank8/hello-prisma | 024cea3 | src/index.ts | TypeScript | www.github.com/armank8/hello-prisma/tree/main/src/index.ts | https://raw.githubusercontent.com/armank8/hello-prisma/024cea3/src/index.ts | armank8/hello-prisma 024cea3 src/index.ts | true | 200 | 642 | import { PrismaClient } from "@prisma/client";
import app from './app';
const prisma = new PrismaClient();
const port = process.env.PORT || 3003;
async function main() {
app.listen(port, () => {
console.log(`server running at ${port}`);
})
}
main();
//////////////////////
//basic code to practice... | 1 |
planetarium/wncg-staking-interface | 46eced9 | components/Modals/View/CooldownModal/useWatch.ts | TypeScript | www.github.com/planetarium/wncg-staking-interface/tree/main/components/Modals/View/CooldownModal/useWatch.ts | https://raw.githubusercontent.com/planetarium/wncg-staking-interface/46eced9/components/Modals/View/CooldownModal/useWatch.ts | planetarium/wncg-staking-interface 46eced9 components/Modals/View/CooldownModal/useWatch.ts | true | 200 | 836 | import { useUnmount } from 'react-use'
import { atom, useAtomValue } from 'jotai'
import { useWaitForTransaction } from 'wagmi'
import { cooldownTxAtom } from 'states/tx'
import { useClientMount, useChain, useRefetch } from 'hooks'
export const cooldownTimestampAtom = atom(0)
export const unstakeTimestampAtom = atom(... | 7 |
manucavallera/Sistema-Gestion | 5ec6f32 | .history/src/app/api/cheques/route_20241115181235.ts | TypeScript | www.github.com/manucavallera/Sistema-Gestion/tree/main/.history/src/app/api/cheques/route_20241115181235.ts | https://raw.githubusercontent.com/manucavallera/Sistema-Gestion/5ec6f32/.history/src/app/api/cheques/route_20241115181235.ts | manucavallera/Sistema-Gestion 5ec6f32 .history/src/app/api/cheques/route_20241115181235.ts | true | 200 | 4,753 | import { NextResponse } from "next/server";
import prisma from "@/lib/prisma"; // Asegúrate de que la ruta a tu cliente Prisma sea correcta
// Función para validar datos
const validateChequeData = (data: any) => {
if (
!data.fechaEmision ||
!data.fechaVencimiento ||
!data.monto ||
(!data.clienteId &&... | 0 |
zopagaduanjr/dcc | 0c8effd | src/app/navigation-help/navigation-help.component.ts | TypeScript | www.github.com/zopagaduanjr/dcc/tree/main/src/app/navigation-help/navigation-help.component.ts | https://raw.githubusercontent.com/zopagaduanjr/dcc/0c8effd/src/app/navigation-help/navigation-help.component.ts | zopagaduanjr/dcc 0c8effd src/app/navigation-help/navigation-help.component.ts | true | 200 | 446 | import { Component, ElementRef } from "@angular/core";
import * as Cesium from "cesium";
@Component({
selector: "app-navigation-help",
templateUrl: "./navigation-help.component.html",
styleUrls: ["./navigation-help.component.css"],
})
export class NavigationHelpComponent {
constructor(private el: ElementRef) {... | 4 |
Dulakshi/Weather-App | cee2fc0 | src/app/city-selector-dialog/city-selector-dialog.component.ts | TypeScript | www.github.com/Dulakshi/Weather-App/tree/main/src/app/city-selector-dialog/city-selector-dialog.component.ts | https://raw.githubusercontent.com/Dulakshi/Weather-App/cee2fc0/src/app/city-selector-dialog/city-selector-dialog.component.ts | Dulakshi/Weather-App cee2fc0 src/app/city-selector-dialog/city-selector-dialog.component.ts | true | 200 | 641 | import {Component, Inject} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {WeatherData} from "../weather-data.model";
@Component({
selector: 'app-multiple-city-dialog',
templateUrl: './city-selector-dialog.component.html',
styleUrls: ['./city-selector-dialog.... | 5 |
Malkishara/Phoenix-Admin-Panel-Frontend | 0d91bd6 | src/app/components/job-category/job-category.component.ts | TypeScript | www.github.com/Malkishara/Phoenix-Admin-Panel-Frontend/tree/main/src/app/components/job-category/job-category.component.ts | https://raw.githubusercontent.com/Malkishara/Phoenix-Admin-Panel-Frontend/0d91bd6/src/app/components/job-category/job-category.component.ts | Malkishara/Phoenix-Admin-Panel-Frontend 0d91bd6 src/app/components/job-category/job-category.component.ts | true | 200 | 1,566 | import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { CategoryService } from 'src/app/services/category.service';
import { DeleteJobCategoryComponent } from '../delete-job-category/delete-job-category.component';
import { Upda... | 2 |
Qadeer199/movierepo | 942bc9c | src/app/api/movies/[id]/route.ts | TypeScript | www.github.com/Qadeer199/movierepo/tree/main/src/app/api/movies/[id]/route.ts | https://raw.githubusercontent.com/Qadeer199/movierepo/942bc9c/src/app/api/movies/%5Bid%5D/route.ts | Qadeer199/movierepo 942bc9c src/app/api/movies/[id]/route.ts | true | 200 | 2,597 | import { NextRequest, NextResponse } from "next/server";
import { PrismaClient } from "@prisma/client";
import { authMiddleware } from "@/lib/auth";
const prisma = new PrismaClient();
// Get a single movie
export async function GET(
request: NextRequest,
{ params }: { params: { id: string } }
) {
try... | 3 |
RushiGhuge/isc-clone | 046c980 | src/app/Home-page/sorting-data/sorting-data.component.ts | TypeScript | www.github.com/RushiGhuge/isc-clone/tree/main/src/app/Home-page/sorting-data/sorting-data.component.ts | https://raw.githubusercontent.com/RushiGhuge/isc-clone/046c980/src/app/Home-page/sorting-data/sorting-data.component.ts | RushiGhuge/isc-clone 046c980 src/app/Home-page/sorting-data/sorting-data.component.ts | true | 200 | 3,485 | import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { addInFilter, removeInFilter } from '../../../Store/iscData.action';
import { Subscriber, Subscription } from 'rxjs';
@Component({
selector: 'app-sorting-data',
standalone: true,
imports: [],
templateUrl: './sorting-data.co... | 1 |
chayanthithan/Angular_Tasks | 44bcf36 | medical/medicalStore/src/app/teachers/teachers.component.ts | TypeScript | www.github.com/chayanthithan/Angular_Tasks/tree/main/medical/medicalStore/src/app/teachers/teachers.component.ts | https://raw.githubusercontent.com/chayanthithan/Angular_Tasks/44bcf36/medical/medicalStore/src/app/teachers/teachers.component.ts | chayanthithan/Angular_Tasks 44bcf36 medical/medicalStore/src/app/teachers/teachers.component.ts | true | 200 | 1,562 | import { Component, OnInit, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Teacher } from '../teacher';
import { TeacherService } from '../services/teacher.service';
import { RouterLink } from '@angular/router';
import { TableModule } from 'primeng/table';
import { MainServiceSe... | 0 |
dyonatamachado/payments-by-user-web | 8aeed05 | src/services/UserService.ts | TypeScript | www.github.com/dyonatamachado/payments-by-user-web/tree/main/src/services/UserService.ts | https://raw.githubusercontent.com/dyonatamachado/payments-by-user-web/8aeed05/src/services/UserService.ts | dyonatamachado/payments-by-user-web 8aeed05 src/services/UserService.ts | true | 200 | 347 | import axios from "axios";
import { User } from "../core/entities/User";
export default class UserService {
url: string;
constructor() {
this.url = "https://localhost:7000/api/users"
}
getUsers() {
return axios.get(this.url);
}
createUser(user: User) {
return axios.po... | 7 |
Ohapzizon/Ohapzizon-Server | d4c6f2a | src/entities/user-profile.entity.ts | TypeScript | www.github.com/Ohapzizon/Ohapzizon-Server/tree/main/src/entities/user-profile.entity.ts | https://raw.githubusercontent.com/Ohapzizon/Ohapzizon-Server/d4c6f2a/src/entities/user-profile.entity.ts | Ohapzizon/Ohapzizon-Server d4c6f2a src/entities/user-profile.entity.ts | true | 200 | 911 | import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
import User from './user.entity';
import { Grade } from '../user/user-profile/enum/grade';
import { Department } from '../user/user-profile/enum/department';
import { BaseTimeEntity } from './base-time.entity';
@Entity('user_profile')
expor... | 4 |
AmiraslanSumgait/ECommerceClient | a9f6361 | src/app/app.component.ts | TypeScript | www.github.com/AmiraslanSumgait/ECommerceClient/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/AmiraslanSumgait/ECommerceClient/a9f6361/src/app/app.component.ts | AmiraslanSumgait/ECommerceClient a9f6361 src/app/app.component.ts | true | 200 | 533 | import { Component } from '@angular/core';
import { Toast, ToastrService } from 'ngx-toastr';
import { MessageType } from './services/admin/alertify.service';
import { CustomToastrService, ToastrMessageType, ToastrPosition } from './services/ui/custom-toastr.service';
declare var $:any
@Component({
selector: 'app-ro... | 5 |
fael0702/Gestor-vip | 8ee9d29 | src/projeto/pedidos/pedidos.rota.ts | TypeScript | www.github.com/fael0702/Gestor-vip/tree/main/src/projeto/pedidos/pedidos.rota.ts | https://raw.githubusercontent.com/fael0702/Gestor-vip/8ee9d29/src/projeto/pedidos/pedidos.rota.ts | fael0702/Gestor-vip 8ee9d29 src/projeto/pedidos/pedidos.rota.ts | true | 200 | 605 | import { Router } from 'express';
import PedidosController from './pedidos.controller';
export default class PedidosRota {
private router: Router;
private controller: PedidosController;
constructor() {
this.router = Router();
this.controller = new PedidosController();
this.initializeRoutes();
}
... | 2 |
gkphp/order_workflow | 7bb9610 | src/client.ts | TypeScript | www.github.com/gkphp/order_workflow/tree/main/src/client.ts | https://raw.githubusercontent.com/gkphp/order_workflow/7bb9610/src/client.ts | gkphp/order_workflow 7bb9610 src/client.ts | true | 200 | 687 | import { Connection, Client } from '@temporalio/client';
import { example } from './workflows';
import { nanoid } from 'nanoid';
async function run() {
const connection = await Connection.connect({ address: 'localhost:7233' });
const client = new Client({
connection,
// namespace: 'foo.bar', // connects t... | 3 |
yousefsalah7/Dating | 43d7e7b | client/src/app/app.component.ts | TypeScript | www.github.com/yousefsalah7/Dating/tree/main/client/src/app/app.component.ts | https://raw.githubusercontent.com/yousefsalah7/Dating/43d7e7b/client/src/app/app.component.ts | yousefsalah7/Dating 43d7e7b client/src/app/app.component.ts | true | 200 | 1,287 | import { HttpClient } from '@angular/common/http';
import { Component, SimpleChanges } from '@angular/core';
import { async } from 'rxjs';
import { Khedma } from './khedma';
import { NotificationService } from './notification.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
style... | 1 |
rhdemo/2021-shiptracker | a4fc811 | frontend/src/__mocks__/shipping.ts | TypeScript | www.github.com/rhdemo/2021-shiptracker/tree/main/frontend/src/__mocks__/shipping.ts | https://raw.githubusercontent.com/rhdemo/2021-shiptracker/a4fc811/frontend/src/__mocks__/shipping.ts | rhdemo/2021-shiptracker a4fc811 frontend/src/__mocks__/shipping.ts | true | 200 | 3,143 | import { ShippingType } from '../app/types';
const MockShipping: ShippingType[] = [
{
id: 1,
ship: {
id: 1,
name: 'MAERSK',
},
containers: [],
startPort: {
id: 1,
latitude: 40.61555785493085,
longitude: -74.17908961253214,
name: 'New York',
},
endPort: ... | 0 |
Prospect121/report | 911c4ac | src/app/shared/const.ts | TypeScript | www.github.com/Prospect121/report/tree/main/src/app/shared/const.ts | https://raw.githubusercontent.com/Prospect121/report/911c4ac/src/app/shared/const.ts | Prospect121/report 911c4ac src/app/shared/const.ts | true | 200 | 414 | export const ACTIVITIES = [
{
enum: 'ACTION_PLAN',
name: 'Plan de acción',
},
{
enum: 'FOLLOW_UP',
name: 'Seguimientos',
},
];
export const AUDIT_STATUS = [
{
enum: 'IN_PROGRESS',
name: 'En proceso',
},
{
enum: 'IMPLEMENTED',
name: 'Implementada',
},
{
enum: 'UNINI... | 7 |
ElaineNew/chatpdf | 6f34505 | src/app/api/stripe/route.ts | TypeScript | www.github.com/ElaineNew/chatpdf/tree/main/src/app/api/stripe/route.ts | https://raw.githubusercontent.com/ElaineNew/chatpdf/6f34505/src/app/api/stripe/route.ts | ElaineNew/chatpdf 6f34505 src/app/api/stripe/route.ts | true | 200 | 1,935 | // /api/stripe
import { db } from '@/lib/db'
import { userSubscriptions } from '@/lib/db/schema'
import { auth, currentUser } from '@clerk/nextjs'
import { NextResponse } from 'next/server'
import {eq} from "drizzle-orm"
import { stripe } from '@/lib/stripe'
const return_url = process.env.NEXT_BASE_URL + '/account'
... | 4 |
przemkokr/file_types_viewer | 31084f0 | src/app/viewers/ms-apps-viewer/word-viewer/word-viewer.component.ts | TypeScript | www.github.com/przemkokr/file_types_viewer/tree/main/src/app/viewers/ms-apps-viewer/word-viewer/word-viewer.component.ts | https://raw.githubusercontent.com/przemkokr/file_types_viewer/31084f0/src/app/viewers/ms-apps-viewer/word-viewer/word-viewer.component.ts | przemkokr/file_types_viewer 31084f0 src/app/viewers/ms-apps-viewer/word-viewer/word-viewer.component.ts | true | 200 | 882 | import { Component, OnInit } from '@angular/core';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
@Component({
selector: 'app-word-viewer',
template: `
<iframe [src]="docUrl" style="width:100%; height:600px;" frameborder="0"></iframe>
`
})
export class WordViewerComponent implemen... | 2 |
z-jeff953/player | 37c525c | packages/player/src/util/dom.ts | TypeScript | www.github.com/z-jeff953/player/tree/main/packages/player/src/util/dom.ts | https://raw.githubusercontent.com/z-jeff953/player/37c525c/packages/player/src/util/dom.ts | z-jeff953/player 37c525c packages/player/src/util/dom.ts | true | 200 | 23,733 | // @ts-nocheck
/**
* @file dom.js
* @module dom
*/
import * as fs from './fullscreen';
import { isObject } from './obj';
import { IS_IOS } from './env';
/**
* Detect if a value is a string with any non-whitespace characters.
*
* @private
* @param {string} str
* The string to check
*
* @return {boole... | 3 |
SMTanimur/social-zone-main | 15f5765 | server/src/apis/utils/validate.ts | TypeScript | www.github.com/SMTanimur/social-zone-main/tree/main/server/src/apis/utils/validate.ts | https://raw.githubusercontent.com/SMTanimur/social-zone-main/15f5765/server/src/apis/utils/validate.ts | SMTanimur/social-zone-main 15f5765 server/src/apis/utils/validate.ts | true | 200 | 313 | import { Request } from "express";
import mongoose from "mongoose";
const REGEX_EMAIL = /^[a-z][a-z0-9_\.]{5,32}@[a-z0-9]{2,}(\.[a-z0-9]{2,4}){1,2}$/;
export const isEmail = (email: string) => {
return REGEX_EMAIL.test(email);
};
export const isMongoId = (id: string) => mongoose.Types.ObjectId.isValid(id);
| 0 |
JohnPetros/telepetros | f211725 | packages/core/src/use-cases/chats/edit-message-use-case.ts | TypeScript | www.github.com/JohnPetros/telepetros/tree/main/packages/core/src/use-cases/chats/edit-message-use-case.ts | https://raw.githubusercontent.com/JohnPetros/telepetros/f211725/packages/core/src/use-cases/chats/edit-message-use-case.ts | JohnPetros/telepetros f211725 packages/core/src/use-cases/chats/edit-message-use-case.ts | true | 200 | 643 | import { MessageNoFoundError } from '#errors'
import type { IUseCase } from '#interfaces/handlers'
import type { IChatsRepository } from '#interfaces/repositories'
type Request = {
messageId: string
newText: string
}
export class EditMessageUseCase implements IUseCase<Request, void> {
constructor(private readon... | 1 |
atomica-dev/land-x-safety-module | b86ac22 | tina/templates/menu.ts | TypeScript | www.github.com/atomica-dev/land-x-safety-module/tree/main/tina/templates/menu.ts | https://raw.githubusercontent.com/atomica-dev/land-x-safety-module/b86ac22/tina/templates/menu.ts | atomica-dev/land-x-safety-module b86ac22 tina/templates/menu.ts | true | 200 | 849 | import { TinaField } from "tinacms";
export const MenuField: TinaField = {
label: "Page Menu",
name: "menuItems",
type: "object",
list: true,
templates: [
{
label: "Home",
name: "home",
fields: [
{ type: "string", name: "title", label: "Title" },
{ type: "string", name:... | 7 |
manoj1005/capstone | 26d082a | src/app/update-user/update-user.component.ts | TypeScript | www.github.com/manoj1005/capstone/tree/main/src/app/update-user/update-user.component.ts | https://raw.githubusercontent.com/manoj1005/capstone/26d082a/src/app/update-user/update-user.component.ts | manoj1005/capstone 26d082a src/app/update-user/update-user.component.ts | true | 200 | 1,074 | import { Component, OnInit } from '@angular/core';
import { URegisterServiceService } from '../u-register-service.service';
import { ActivatedRoute, Router } from '@angular/router';
import { User } from '../user';
@Component({
selector: 'app-update-user',
templateUrl: './update-user.component.html',
styleUrls: ['... | 5 |
samchon/typia | b00ec46 | test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts | TypeScript | www.github.com/samchon/typia/tree/main/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts | https://raw.githubusercontent.com/samchon/typia/b00ec46/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts | samchon/typia b00ec46 test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts | true | 200 | 576 | import typia from "typia";
import { _test_llm_parameters } from "../../../internal/_test_llm_parameters";
import { TypeTagCustom } from "../../../structures/TypeTagCustom";
export const test_llm_parameters_chatgpt_TypeTagCustom = _test_llm_parameters({
model: "chatgpt",
name: "TypeTagCustom",
})(typia.llm.paramet... | 4 |
RodriCabrera/cowork-turbo | 795e418 | apps/api/users/userService.ts | TypeScript | www.github.com/RodriCabrera/cowork-turbo/tree/main/apps/api/users/userService.ts | https://raw.githubusercontent.com/RodriCabrera/cowork-turbo/795e418/apps/api/users/userService.ts | RodriCabrera/cowork-turbo 795e418 apps/api/users/userService.ts | true | 200 | 3,462 | import { PrismaClient } from '@prisma/client'
import CustomError, { ERROR_CODES } from '../errors/customError'
import PrismaErrors from '../errors/prismaErrors'
import MailService from '../mail/mailService'
import { loginTemplate } from '../mail/templates'
import AuthUtils from '../utils/auth.utils'
import { Crea... | 2 |
milena-mile/euphoria-shop-react | 3819339 | src/utils/handleCartResult.ts | TypeScript | www.github.com/milena-mile/euphoria-shop-react/tree/main/src/utils/handleCartResult.ts | https://raw.githubusercontent.com/milena-mile/euphoria-shop-react/3819339/src/utils/handleCartResult.ts | milena-mile/euphoria-shop-react 3819339 src/utils/handleCartResult.ts | true | 200 | 648 | import { WishlistCartData } from "../slices/types";
const handleCartResult = (item: WishlistCartData, quantity?: number) => {
const price = item.sale !== 0 ? item.price - (item.price * item.sale / 100) : item.price;
const totalPrice = price * (quantity ? quantity : item.quantity);
let shippingPrice;
sw... | 1 |
DyweTrading/DyweApp | fa39502 | DyweClient/src/app/services/candles/candles.service.ts | TypeScript | www.github.com/DyweTrading/DyweApp/tree/main/DyweClient/src/app/services/candles/candles.service.ts | https://raw.githubusercontent.com/DyweTrading/DyweApp/fa39502/DyweClient/src/app/services/candles/candles.service.ts | DyweTrading/DyweApp fa39502 DyweClient/src/app/services/candles/candles.service.ts | true | 200 | 1,980 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Candle } from 'app/interfaces/candle';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class CandlesService {
private baseUrl = 'https://app.dywetrading.com'; // Тут будет ссылка н... | 0 |
HadleyLab/ucfwealth-frontend | b13fcb2 | contrib/emr-config/config.d.ts | TypeScript | www.github.com/HadleyLab/ucfwealth-frontend/tree/main/contrib/emr-config/config.d.ts | https://raw.githubusercontent.com/HadleyLab/ucfwealth-frontend/b13fcb2/contrib/emr-config/config.d.ts | HadleyLab/ucfwealth-frontend b13fcb2 contrib/emr-config/config.d.ts | true | 200 | 471 | declare const config: {
clientId: string;
wearablesAccessConsentCodingSystem: string;
tier: string;
baseURL: string;
sdcIdeUrl: string;
aiQuestionnaireBuilderUrl: string;
sdcBackendUrl: string | null;
webSentryDSN: string | null;
mobileSentryDSN: string | null;
jitsiMeetServer... | 7 |
GLANEUX/F1_react-timer_V2 | ec78915 | src/services/user.service.ts | TypeScript | www.github.com/GLANEUX/F1_react-timer_V2/tree/main/src/services/user.service.ts | https://raw.githubusercontent.com/GLANEUX/F1_react-timer_V2/ec78915/src/services/user.service.ts | GLANEUX/F1_react-timer_V2 ec78915 src/services/user.service.ts | true | 200 | 4,763 | import bcrypt from "bcrypt";
import jwt from "jsonwebtoken";
import User from "../models/user.model";
import dotenv from "dotenv";
import validator from 'validator';
dotenv.config();
const saltRounds = 10;
const passwordRegex =
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{5,}$/;
interface UserRe... | 4 |
Th0mcar/Bitcoin-price-app | c6a4d1b | src/app/views/details/details.component.ts | TypeScript | www.github.com/Th0mcar/Bitcoin-price-app/tree/main/src/app/views/details/details.component.ts | https://raw.githubusercontent.com/Th0mcar/Bitcoin-price-app/c6a4d1b/src/app/views/details/details.component.ts | Th0mcar/Bitcoin-price-app c6a4d1b src/app/views/details/details.component.ts | true | 200 | 2,246 | import { CommonModule } from '@angular/common';
import { ChangeDetectorRef, Component, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ElectronStoreService } from '../../electron-sotre.service';
import { StoreKeys } from '../../utils/storeKeys';
import { BitcoinPrice... | 5 |
taiga-family/taiga-ui | d74a2d2 | projects/kit/components/line-clamp/line-clamp-box.component.ts | TypeScript | www.github.com/taiga-family/taiga-ui/tree/main/projects/kit/components/line-clamp/line-clamp-box.component.ts | https://raw.githubusercontent.com/taiga-family/taiga-ui/d74a2d2/projects/kit/components/line-clamp/line-clamp-box.component.ts | taiga-family/taiga-ui d74a2d2 projects/kit/components/line-clamp/line-clamp-box.component.ts | true | 200 | 851 | import {ChangeDetectionStrategy, Component} from '@angular/core';
import {tuiFadeIn} from '@taiga-ui/core/animations';
import {TUI_HINT_PROVIDERS, TuiHintComponent} from '@taiga-ui/core/directives/hint';
import {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';
@Component({
standalone: true,
selector: 'tui-hi... | 7 |
Ale-1508/portfolio | 407487e | src/logic/db.ts | TypeScript | www.github.com/Ale-1508/portfolio/tree/main/src/logic/db.ts | https://raw.githubusercontent.com/Ale-1508/portfolio/407487e/src/logic/db.ts | Ale-1508/portfolio 407487e src/logic/db.ts | true | 200 | 1,000 | import mongoose, { Mongoose } from 'mongoose';
const MONGO_URL: string | undefined = process.env.MONGO_URL;
if (!MONGO_URL) {
throw new Error('Please define the MONGO_URL environment variable inside .env.local');
}
interface MongooseCache {
conn: Mongoose | null;
promise: Promise<Mongoose> | null;
models?: m... | 1 |
NVrhovski/coder-angular | ed79cdd | src/app/features/courses/store/courses.actions.ts | TypeScript | www.github.com/NVrhovski/coder-angular/tree/main/src/app/features/courses/store/courses.actions.ts | https://raw.githubusercontent.com/NVrhovski/coder-angular/ed79cdd/src/app/features/courses/store/courses.actions.ts | NVrhovski/coder-angular ed79cdd src/app/features/courses/store/courses.actions.ts | true | 200 | 1,108 | import { createAction, props } from '@ngrx/store';
import { course } from 'src/app/shared/interfaces/course';
export const loadCourses = createAction(
'[Courses] Load Courses'
);
export const loadCoursesSuccess = createAction(
'[Courses] Load Courses Success',
props<{ data: course[] }>()
);
export const loadCo... | 0 |
lucasArena/Nadir | 966df7d | src/services/users/UpdateUserService.ts | TypeScript | www.github.com/lucasArena/Nadir/tree/main/src/services/users/UpdateUserService.ts | https://raw.githubusercontent.com/lucasArena/Nadir/966df7d/src/services/users/UpdateUserService.ts | lucasArena/Nadir 966df7d src/services/users/UpdateUserService.ts | true | 200 | 1,026 | import { injectable, inject } from 'tsyringe';
import IUserRepository from 'repositories/users/IUserRepository';
import AppError from 'shared/errors/AppError';
import IUser from 'dtos/users/IUser';
import User from '../../repositories/users/typeorm/entities/User';
interface IRequest {
id: string;
userData: IUser;... | 4 |
sijunkim/naver-news | 91f25a5 | src/naver/news.service.ts | TypeScript | www.github.com/sijunkim/naver-news/tree/main/src/naver/news.service.ts | https://raw.githubusercontent.com/sijunkim/naver-news/91f25a5/src/naver/news.service.ts | sijunkim/naver-news 91f25a5 src/naver/news.service.ts | true | 200 | 12,318 | import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import axios, { AxiosRequestConfig } from 'axios';
import { ConfigType } from '@nestjs/config';
import { HttpResponse } from 'src/entity/httpResponse';
import { XMLParser } from 'fast-xml-parser';
import { News } from 'src/entity/news';
import SlackWebh... | 5 |
TomH1973/gauntletai-chatapp | 5d7b215 | lib/storage/fileStorage.ts | TypeScript | www.github.com/TomH1973/gauntletai-chatapp/tree/main/lib/storage/fileStorage.ts | https://raw.githubusercontent.com/TomH1973/gauntletai-chatapp/5d7b215/lib/storage/fileStorage.ts | TomH1973/gauntletai-chatapp 5d7b215 lib/storage/fileStorage.ts | true | 200 | 4,180 | import { FileType } from '@prisma/client';
import { prisma } from '../prisma';
import { ResourceIsolation } from '../auth/resourceIsolation';
const ALLOWED_FILE_TYPES = {
IMAGE: ['image/jpeg', 'image/png', 'image/gif', 'image/webp'],
VIDEO: ['video/mp4', 'video/webm'],
AUDIO: ['audio/mp3', 'audio/wav', 'a... | 2 |
BuiHung12/new-fe-idiqr | ce8fad1 | src/stores/store.ts | TypeScript | www.github.com/BuiHung12/new-fe-idiqr/tree/main/src/stores/store.ts | https://raw.githubusercontent.com/BuiHung12/new-fe-idiqr/ce8fad1/src/stores/store.ts | BuiHung12/new-fe-idiqr ce8fad1 src/stores/store.ts | true | 200 | 406 | import { configureStore } from '@reduxjs/toolkit';
import rootReducer from './rootReducer';
export const store = configureStore({
reducer: rootReducer,
// thêm các middleware khác nếu cần
// middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(myMiddleware),
});
export type RootState = Retu... | 3 |
eduardojpanzo/training-reactjs | 950e7c0 | redeux-fundamentals/src/store/index.ts | TypeScript | www.github.com/eduardojpanzo/training-reactjs/tree/main/redeux-fundamentals/src/store/index.ts | https://raw.githubusercontent.com/eduardojpanzo/training-reactjs/950e7c0/redeux-fundamentals/src/store/index.ts | eduardojpanzo/training-reactjs 950e7c0 redeux-fundamentals/src/store/index.ts | true | 200 | 572 | import { configureStore, createSlice } from "@reduxjs/toolkit";
import { TypedUseSelectorHook, useSelector } from "react-redux";
export const todoSlice = createSlice({
name: "todo",
initialState: ["fazer cafe", "Estudar redux", "Comer um pouco"],
reducers: {
add: (state, action) => {
state.push(action.... | 7 |
yulyaolshanska/React-App2 | cdcc977 | client/src/redux/tasks/taskSlice.ts | TypeScript | www.github.com/yulyaolshanska/React-App2/tree/main/client/src/redux/tasks/taskSlice.ts | https://raw.githubusercontent.com/yulyaolshanska/React-App2/cdcc977/client/src/redux/tasks/taskSlice.ts | yulyaolshanska/React-App2 cdcc977 client/src/redux/tasks/taskSlice.ts | true | 200 | 1,370 | import { createSlice } from "@reduxjs/toolkit";
import { TaskState } from "../../interfaces/TaskState";
import { fetchTasks, addTask, updateTask, deleteTask } from "./taskAsyncThunk";
const initialState: TaskState = {
tasks: [],
loading: false,
error: null,
};
const taskSlice = createSlice({
name: "task",
i... | 1 |
renanconstancio/ecommerce-api | ffa3184 | src/modules/stores/useCases/UpdateStores/UpdateStoresUseCases.spec.ts | TypeScript | www.github.com/renanconstancio/ecommerce-api/tree/main/src/modules/stores/useCases/UpdateStores/UpdateStoresUseCases.spec.ts | https://raw.githubusercontent.com/renanconstancio/ecommerce-api/ffa3184/src/modules/stores/useCases/UpdateStores/UpdateStoresUseCases.spec.ts | renanconstancio/ecommerce-api ffa3184 src/modules/stores/useCases/UpdateStores/UpdateStoresUseCases.spec.ts | true | 200 | 1,099 | import 'reflect-metadata';
import FakeStoresRepository from '@modules/stores/repositories/fakes/FakeStoresRepository';
import UpdateStoresUseCases from '@modules/stores/useCases/UpdateStores/UpdateStoresUseCases';
import AppError from '@shared/errors/AppError';
let fakeStoresRepository: FakeStoresRepository;
let updat... | 0 |
Hiago75/ddd_fullcycle | eb0bacd | src/usecase/customer/update/update.customer.usecase.ts | TypeScript | www.github.com/Hiago75/ddd_fullcycle/tree/main/src/usecase/customer/update/update.customer.usecase.ts | https://raw.githubusercontent.com/Hiago75/ddd_fullcycle/eb0bacd/src/usecase/customer/update/update.customer.usecase.ts | Hiago75/ddd_fullcycle eb0bacd src/usecase/customer/update/update.customer.usecase.ts | true | 200 | 1,133 | import CustomerRepositoryInteface from "../../../domain/customer/repository/customer.repository.interface";
import Address from "../../../domain/customer/value-object/Address";
import { InputUpdateCustomerDto, OutputUpdateCustomerDto } from "./update.customer.dto";
export default class UpdateCustomerUseCase {
privat... | 4 |
ahmaddani227/react-porto | c3d7838 | src/hooks/useIde.ts | TypeScript | www.github.com/ahmaddani227/react-porto/tree/main/src/hooks/useIde.ts | https://raw.githubusercontent.com/ahmaddani227/react-porto/c3d7838/src/hooks/useIde.ts | ahmaddani227/react-porto c3d7838 src/hooks/useIde.ts | true | 200 | 1,340 | import { useState, useEffect } from "react";
type TabType = {
id: string;
title: string;
};
type ExpandedFoldersType = {
[key: string]: boolean;
};
export const useIde = (
isDekstop: boolean,
initialTabs: TabType[],
initialExpandedFolders: ExpandedFoldersType
) => {
const [tabs, setTabs] = useState<Tab... | 5 |
Arely2409/PWA_AntojitosRamirez | 2c85d38 | src/app/services/detalle-ticket.service.ts | TypeScript | www.github.com/Arely2409/PWA_AntojitosRamirez/tree/main/src/app/services/detalle-ticket.service.ts | https://raw.githubusercontent.com/Arely2409/PWA_AntojitosRamirez/2c85d38/src/app/services/detalle-ticket.service.ts | Arely2409/PWA_AntojitosRamirez 2c85d38 src/app/services/detalle-ticket.service.ts | true | 200 | 1,063 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { detalleTicket } from '../models/detalleTicket';
@Injectable({
providedIn: 'root'
})
export class DetalleTicketService {
URL_API = 'https://prueba-6-jov9.onrender.com/detalleTickets';
detallesTicket: detalleTic... | 2 |
truemark/cdk | 5e37f56 | aws-cloudwatch/lib/log-metric-alarm.ts | TypeScript | www.github.com/truemark/cdk/tree/main/aws-cloudwatch/lib/log-metric-alarm.ts | https://raw.githubusercontent.com/truemark/cdk/5e37f56/aws-cloudwatch/lib/log-metric-alarm.ts | truemark/cdk 5e37f56 aws-cloudwatch/lib/log-metric-alarm.ts | true | 200 | 5,358 | import {
Alarm,
ComparisonOperator,
IAlarm,
IAlarmAction,
Metric,
TreatMissingData,
} from 'aws-cdk-lib/aws-cloudwatch';
import {Construct} from 'constructs';
import {LogMetricFilter, LogMetricFilterProps} from './log-metric-filter';
import {Duration, RemovalPolicy, ResourceEnvironment, Stack} from 'aws-cdk... | 3 |
leafarfernandes/vue-landingPage | f23d6f9 | src/stories/SectionPicture.stories.ts | TypeScript | www.github.com/leafarfernandes/vue-landingPage/tree/main/src/stories/SectionPicture.stories.ts | https://raw.githubusercontent.com/leafarfernandes/vue-landingPage/f23d6f9/src/stories/SectionPicture.stories.ts | leafarfernandes/vue-landingPage f23d6f9 src/stories/SectionPicture.stories.ts | true | 200 | 549 | import type { Meta } from '@storybook/vue3'
import SectionPicture, { type Props } from '@/components/SectionPicture.vue'
import type { StoryObjProped } from '@/types/storybook.types'
import { SectionPictureMock } from '@/stories/mock/sectionPicture.mock'
const meta: Meta<typeof SectionPicture> = {
title: 'Sections/P... | 7 |
TuzaGordie/evolutics | 908bd06 | src/app/Life/payment-desk/service/payment-desk.service.spec.ts | TypeScript | www.github.com/TuzaGordie/evolutics/tree/main/src/app/Life/payment-desk/service/payment-desk.service.spec.ts | https://raw.githubusercontent.com/TuzaGordie/evolutics/908bd06/src/app/Life/payment-desk/service/payment-desk.service.spec.ts | TuzaGordie/evolutics 908bd06 src/app/Life/payment-desk/service/payment-desk.service.spec.ts | true | 200 | 383 | import { TestBed } from '@angular/core/testing';
import { PaymentDeskService } from './payment-desk.service';
describe('PaymentDeskService', () => {
let service: PaymentDeskService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(PaymentDeskService);
});
it('should be... | 0 |
dfpires/api-vendas-pp2-2022 | 651dbe3 | src/modules/products/controllers/ProductController.ts | TypeScript | www.github.com/dfpires/api-vendas-pp2-2022/tree/main/src/modules/products/controllers/ProductController.ts | https://raw.githubusercontent.com/dfpires/api-vendas-pp2-2022/651dbe3/src/modules/products/controllers/ProductController.ts | dfpires/api-vendas-pp2-2022 651dbe3 src/modules/products/controllers/ProductController.ts | true | 200 | 2,379 | import { Request, Response } from "express";
import CreateProductService from "../services/CreateProductService";
import DeleteProductService from "../services/DeleteProductService";
import ListProductService from "../services/ListProductService";
import ShowProductService from "../services/ShowProductService";
im... | 1 |
Rizkimwp/galon_backend | a917590 | src/controllers/courier/courier.controller.ts | TypeScript | www.github.com/Rizkimwp/galon_backend/tree/main/src/controllers/courier/courier.controller.ts | https://raw.githubusercontent.com/Rizkimwp/galon_backend/a917590/src/controllers/courier/courier.controller.ts | Rizkimwp/galon_backend a917590 src/controllers/courier/courier.controller.ts | true | 200 | 1,850 | import {
Body,
Controller,
Delete,
Get,
Param,
Post,
Put,
} from '@nestjs/common';
import {
ApiBearerAuth,
ApiBody,
ApiOperation,
ApiResponse,
ApiTags,
} from '@nestjs/swagger';
import {
CourierDto,
CreateCourierDto,
UpdateCourierDto,
} from 'src/dto/courierDto';
import { CourierService } ... | 5 |
vikaspurbia/BackendProduct | 8a412c8 | src/model/product.model.ts | TypeScript | www.github.com/vikaspurbia/BackendProduct/tree/main/src/model/product.model.ts | https://raw.githubusercontent.com/vikaspurbia/BackendProduct/8a412c8/src/model/product.model.ts | vikaspurbia/BackendProduct 8a412c8 src/model/product.model.ts | true | 200 | 821 | import { Model, DataTypes } from 'sequelize';
import sequelize from '../config/db';
class Product extends Model {
public id!: number;
public name!: string;
public price!: number;
public description!: string;
public stock!: number;
}
Product.init({
id: {
type: DataTypes.INTEGER,
... | 4 |
netease-lcap/ui-libraries | 4f80018 | libraries/element-ui/src/pro-components/el-date-picker-pro/hooks/index.ts | TypeScript | www.github.com/netease-lcap/ui-libraries/tree/main/libraries/element-ui/src/pro-components/el-date-picker-pro/hooks/index.ts | https://raw.githubusercontent.com/netease-lcap/ui-libraries/4f80018/libraries/element-ui/src/pro-components/el-date-picker-pro/hooks/index.ts | netease-lcap/ui-libraries 4f80018 libraries/element-ui/src/pro-components/el-date-picker-pro/hooks/index.ts | true | 200 | 8,400 | import { DateRangeValue, DateValue, PickContext } from '@element-pro';
import { useSyncState } from '@lcap/vue2-utils';
import { MapGet } from '@lcap/vue2-utils/plugins/types';
import { ComputedRef, Ref, unref } from '@vue/composition-api';
import dayjs, { Dayjs } from 'dayjs';
import ZH_CN from 'dayjs/locale/zh-cn';
i... | 2 |
ilmahdi/42_transcendence | e714c0e | front/src/app/components/visitors/two-fa-login/two-fa-login.component.ts | TypeScript | www.github.com/ilmahdi/42_transcendence/tree/main/front/src/app/components/visitors/two-fa-login/two-fa-login.component.ts | https://raw.githubusercontent.com/ilmahdi/42_transcendence/e714c0e/front/src/app/components/visitors/two-fa-login/two-fa-login.component.ts | ilmahdi/42_transcendence e714c0e front/src/app/components/visitors/two-fa-login/two-fa-login.component.ts | true | 200 | 2,759 | import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { AuthService } from 'src/app/s... | 3 |
belyshevaoksanai/pomodoro | a2005f2 | src/store/confirm-dialog/confirm-dialog.ts | TypeScript | www.github.com/belyshevaoksanai/pomodoro/tree/main/src/store/confirm-dialog/confirm-dialog.ts | https://raw.githubusercontent.com/belyshevaoksanai/pomodoro/a2005f2/src/store/confirm-dialog/confirm-dialog.ts | belyshevaoksanai/pomodoro a2005f2 src/store/confirm-dialog/confirm-dialog.ts | true | 200 | 573 | import { PayloadAction, createSlice } from "@reduxjs/toolkit";
const INITIAL_STATE = {
message: '',
onConfirm: () => {},
}
export const confirmDialogSlice = createSlice({
name: 'confirmDialog',
initialState: INITIAL_STATE,
reducers: {
setMessage: (state, { payload }: PayloadAction<{message... | 7 |
monitoring-application/admin-front | 7d059b6 | src/app/app-routing.module.ts | TypeScript | www.github.com/monitoring-application/admin-front/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/monitoring-application/admin-front/7d059b6/src/app/app-routing.module.ts | monitoring-application/admin-front 7d059b6 src/app/app-routing.module.ts | true | 200 | 1,314 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LandingPageComponent } from './pages/landing-page/landing-page.component';
import { LoginComponent } from './pages/login/login.component';
import { SignUpComponent } from './pages/sign-up/sign-up.component';
impor... | 0 |
vlmaslennikov/simple_jwt_CRUD_text_profanity_check | f2854ec | src/modules/auth/auth.service.ts | TypeScript | www.github.com/vlmaslennikov/simple_jwt_CRUD_text_profanity_check/tree/main/src/modules/auth/auth.service.ts | https://raw.githubusercontent.com/vlmaslennikov/simple_jwt_CRUD_text_profanity_check/f2854ec/src/modules/auth/auth.service.ts | vlmaslennikov/simple_jwt_CRUD_text_profanity_check f2854ec src/modules/auth/auth.service.ts | true | 200 | 2,641 | import {
BadRequestException,
Injectable,
NotFoundException,
} from '@nestjs/common';
import * as bcrypt from 'bcrypt';
import { JwtService } from '@nestjs/jwt';
import * as _ from 'lodash';
import { ConfigService } from '@nestjs/config';
import { UserService } from '../users/user.service';
import { CreateUserDto... | 1 |
Viet121/Viet_TLTN | 29486ed | src/app/pages/logins/add-pass/add-pass.component.ts | TypeScript | www.github.com/Viet121/Viet_TLTN/tree/main/src/app/pages/logins/add-pass/add-pass.component.ts | https://raw.githubusercontent.com/Viet121/Viet_TLTN/29486ed/src/app/pages/logins/add-pass/add-pass.component.ts | Viet121/Viet_TLTN 29486ed src/app/pages/logins/add-pass/add-pass.component.ts | true | 200 | 2,849 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { NgToastService } from 'ng-angular-popup';
import { UserForm } from 'src/app/mod... | 5 |
roq-ai/iniwifi-q-e002 | 8d8a6b6 | src/interfaces/troubleshoot/index.ts | TypeScript | www.github.com/roq-ai/iniwifi-q-e002/tree/main/src/interfaces/troubleshoot/index.ts | https://raw.githubusercontent.com/roq-ai/iniwifi-q-e002/8d8a6b6/src/interfaces/troubleshoot/index.ts | roq-ai/iniwifi-q-e002 8d8a6b6 src/interfaces/troubleshoot/index.ts | true | 200 | 640 | import { UserInterface } from 'interfaces/user';
import { CustomerInterface } from 'interfaces/customer';
import { GetQueryInterface } from 'interfaces';
export interface TroubleshootInterface {
id?: string;
issue_description: string;
resolution: string;
resolved_by: string;
customer_id: string;
resolution... | 4 |
vmurashev365/playwright_fundamentals | bdd1f71 | test/e2e/e2e-currency-exchange.spec.ts | TypeScript | www.github.com/vmurashev365/playwright_fundamentals/tree/main/test/e2e/e2e-currency-exchange.spec.ts | https://raw.githubusercontent.com/vmurashev365/playwright_fundamentals/bdd1f71/test/e2e/e2e-currency-exchange.spec.ts | vmurashev365/playwright_fundamentals bdd1f71 test/e2e/e2e-currency-exchange.spec.ts | true | 200 | 1,370 | //npm run tests:e2e
import { test, expect } from "@playwright/test"
test.describe.parallel("Currency exchange form", () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://zero.webappsecurity.com/index.html')
await page.click("//button[@id='signin_button']")
await page.type(... | 2 |
shehroz665/AngularAdvance | 4a5c3f2 | src/app/Guard/auth-guard.guard.ts | TypeScript | www.github.com/shehroz665/AngularAdvance/tree/main/src/app/Guard/auth-guard.guard.ts | https://raw.githubusercontent.com/shehroz665/AngularAdvance/4a5c3f2/src/app/Guard/auth-guard.guard.ts | shehroz665/AngularAdvance 4a5c3f2 src/app/Guard/auth-guard.guard.ts | true | 200 | 448 | import { CanActivateFn, Router } from '@angular/router';
import {inject} from '@angular/core'
export const authGuardGuard: CanActivateFn = (route, state) => {
const path= route.url[0].path;
let roleId=1;
const router=inject(Router);
console.log(path);
if(roleId===1){
return true;
}
else{
if(pa... | 3 |
ncl-carteaga/DAP | 2fb78e5 | DAP/DAP.Web/Modules/SSISConfig/SsisConfigBase/SsisConfigBaseDialog.ts | TypeScript | www.github.com/ncl-carteaga/DAP/tree/main/DAP/DAP.Web/Modules/SSISConfig/SsisConfigBase/SsisConfigBaseDialog.ts | https://raw.githubusercontent.com/ncl-carteaga/DAP/2fb78e5/DAP/DAP.Web/Modules/SSISConfig/SsisConfigBase/SsisConfigBaseDialog.ts | ncl-carteaga/DAP 2fb78e5 DAP/DAP.Web/Modules/SSISConfig/SsisConfigBase/SsisConfigBaseDialog.ts | true | 200 | 1,000 |
namespace DAP.SSISConfig {
@Serenity.Decorators.registerClass()
export class SsisConfigBaseDialog extends Serenity.EntityDialog<SsisConfigBaseRow, any> {
protected getFormKey() { return SsisConfigBaseForm.formKey; }
protected getIdProperty() { return SsisConfigBaseRow.idProperty; }
pr... | 0 |
pepeakash/harsha | 7392c15 | tests/frame.test.ts | TypeScript | www.github.com/pepeakash/harsha/tree/main/tests/frame.test.ts | https://raw.githubusercontent.com/pepeakash/harsha/7392c15/tests/frame.test.ts | pepeakash/harsha 7392c15 tests/frame.test.ts | true | 200 | 860 | import { test } from "@playwright/test";
test("New Frame API - frame using page.frameLocator", async ({ page }) => {
await page.goto("https://letcode.in/frame");
const frame = page.frameLocator("#firstFr");
await frame.locator("input[name='fname']").fill("koushik");
const lname = frame.locator("input[name='lnam... | 7 |
srfgroupcontactus/SrfGroupFE | c7bf3cc | src/main-features/offer/store/slice.ts | TypeScript | www.github.com/srfgroupcontactus/SrfGroupFE/tree/main/src/main-features/offer/store/slice.ts | https://raw.githubusercontent.com/srfgroupcontactus/SrfGroupFE/c7bf3cc/src/main-features/offer/store/slice.ts | srfgroupcontactus/SrfGroupFE c7bf3cc src/main-features/offer/store/slice.ts | true | 200 | 13,580 | import { createSlice, Slice } from "@reduxjs/toolkit";
import { initialState } from "./initial.state";
import offerReducer from "./reducers/offer.reducer";
import sellerOfferReducer from "./reducers/seller.offer.reducer";
import rentOfferReducer from "./reducers/rent.offer.reducer";
import findOfferReducer from "./redu... | 1 |
yamiteru/pipu | 035e644 | src/types.ts | TypeScript | www.github.com/yamiteru/pipu/tree/main/src/types.ts | https://raw.githubusercontent.com/yamiteru/pipu/035e644/src/types.ts | yamiteru/pipu 035e644 src/types.ts | true | 200 | 5,362 | import { ObjectAny, Result, ResultErr, ResultOk } from "elfs";
// Error tuple [reason, value, optional context].
export type Error<
$Reason extends string = string,
$Value = any,
$Context extends ObjectAny = ObjectAny,
> = [reason: $Reason, value: $Value, context?: $Context];
// Sync function which can be put i... | 5 |
hungnguyen2809/food-delivery-app | 0e5732e | src/screens/CartScreen/styles.ts | TypeScript | www.github.com/hungnguyen2809/food-delivery-app/tree/main/src/screens/CartScreen/styles.ts | https://raw.githubusercontent.com/hungnguyen2809/food-delivery-app/0e5732e/src/screens/CartScreen/styles.ts | hungnguyen2809/food-delivery-app 0e5732e src/screens/CartScreen/styles.ts | true | 200 | 3,587 | import {StyleSheet} from 'react-native';
import {Colors, Fonts} from 'src/constants';
import {fontScale, scale, setHeight, setWidth} from 'src/utils';
export const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.DEFAULT_WHITE,
},
headerContainer: {
flexDirection: 'row',
... | 4 |
aleph-im/front-aleph-cloud-page | bf5dfea | src/hooks/form/useAddEnvVars.ts | TypeScript | www.github.com/aleph-im/front-aleph-cloud-page/tree/main/src/hooks/form/useAddEnvVars.ts | https://raw.githubusercontent.com/aleph-im/front-aleph-cloud-page/bf5dfea/src/hooks/form/useAddEnvVars.ts | aleph-im/front-aleph-cloud-page bf5dfea src/hooks/form/useAddEnvVars.ts | true | 200 | 1,850 | import { useCallback } from 'react'
import {
Control,
FieldArrayWithId,
UseControllerReturn,
useController,
useFieldArray,
} from 'react-hook-form'
export type EnvVarField = {
name: string
value: string
}
export const defaultValues: EnvVarField = {
name: '',
value: '',
}
export type UseEnvVarItemPr... | 2 |
JakcinManoj/NestJs-CodeFirst | 6e07bdd | src/app.module.ts | TypeScript | www.github.com/JakcinManoj/NestJs-CodeFirst/tree/main/src/app.module.ts | https://raw.githubusercontent.com/JakcinManoj/NestJs-CodeFirst/6e07bdd/src/app.module.ts | JakcinManoj/NestJs-CodeFirst 6e07bdd src/app.module.ts | true | 200 | 864 | import { Module } from '@nestjs/common';
import { UserModule } from './user/user.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import * as dotenv from 'dotenv';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver } from '@nestjs/apollo';
dotenv.config();
@Module({
imports: [
TypeOr... | 7 |
kalpesh-karbh/experiment-game-backend | 1c5230a | src/controllers/army.controller.ts | TypeScript | www.github.com/kalpesh-karbh/experiment-game-backend/tree/main/src/controllers/army.controller.ts | https://raw.githubusercontent.com/kalpesh-karbh/experiment-game-backend/1c5230a/src/controllers/army.controller.ts | kalpesh-karbh/experiment-game-backend 1c5230a src/controllers/army.controller.ts | true | 200 | 359 | import * as httpStatus from "http-status";
import { getAllArmies } from "../services/army.service";
import catchAsync from "../utils/catchAsync";
const getArmy = catchAsync(async (req, res) => {
const armies = await getAllArmies();
res
.status(httpStatus.OK)
.send({ status: httpStatus.OK, message: "success... | 0 |
AleksiDu/pedagogue-v1 | 8725232 | src/utils/fetchProfileImage .ts | TypeScript | www.github.com/AleksiDu/pedagogue-v1/tree/main/src/utils/fetchProfileImage .ts | https://raw.githubusercontent.com/AleksiDu/pedagogue-v1/8725232/src/utils/fetchProfileImage%20.ts | AleksiDu/pedagogue-v1 8725232 src/utils/fetchProfileImage .ts | true | 200 | 1,037 | import axios from "../api/axios";
interface ProfileImage {
id: string;
profilePhoto: boolean;
url: string;
}
interface ProfileResponse {
images: ProfileImage[];
}
const fetchProfileImage = async (
userRole: number,
accessToken: string
): Promise<ProfileImage[] | undefined> => {
try {
let updatedUse... | 3 |
pandeysubash404/project-hub | ae5c64a | server/src/routes/users.ts | TypeScript | www.github.com/pandeysubash404/project-hub/tree/main/server/src/routes/users.ts | https://raw.githubusercontent.com/pandeysubash404/project-hub/ae5c64a/server/src/routes/users.ts | pandeysubash404/project-hub ae5c64a server/src/routes/users.ts | true | 200 | 1,386 | import express from 'express';
import usersController from 'controllers/users';
import {
loginSchema,
registerSchema,
updateUserOrgSchema,
updateUserProfileSchema,
} from 'lib/zod';
import { validate } from 'middleware/validate';
import { verifyToken } from 'middleware/verifyToken';
const router = express.Rou... | 5 |
fredericobsb/testesUnitariosAngular | d5c4c53 | src/app/app.component.ts | TypeScript | www.github.com/fredericobsb/testesUnitariosAngular/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/fredericobsb/testesUnitariosAngular/d5c4c53/src/app/app.component.ts | fredericobsb/testesUnitariosAngular d5c4c53 src/app/app.component.ts | true | 200 | 587 | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
user: any;
constructor(private router: Router) {
}
... | 4 |
seatable/n8n-node-sysadmin | 4d80cfc | nodes/SeaAdmin/v1/actions/bases/export_base/execute.ts | TypeScript | www.github.com/seatable/n8n-node-sysadmin/tree/main/nodes/SeaAdmin/v1/actions/bases/export_base/execute.ts | https://raw.githubusercontent.com/seatable/n8n-node-sysadmin/4d80cfc/nodes/SeaAdmin/v1/actions/bases/export_base/execute.ts | seatable/n8n-node-sysadmin 4d80cfc nodes/SeaAdmin/v1/actions/bases/export_base/execute.ts | true | 200 | 1,384 | import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import { OptionsWithUri } from 'request';
export async function export_base(
this: IExecuteFunctions,
index: number,
): Promise<INodeExecutionData[]> {
// get URL
const credentials = await this.getCredentials('seaadminApi');
const baseURL ... | 1 |
MaxLope117/NOC | 34ca668 | src/infrastructure/repositories/log.repository.impl.ts | TypeScript | www.github.com/MaxLope117/NOC/tree/main/src/infrastructure/repositories/log.repository.impl.ts | https://raw.githubusercontent.com/MaxLope117/NOC/34ca668/src/infrastructure/repositories/log.repository.impl.ts | MaxLope117/NOC 34ca668 src/infrastructure/repositories/log.repository.impl.ts | true | 200 | 496 | import {
LogDatasource,
LogEntity,
LogRepository,
LogSeverityLevel,
} from '../../domain';
export class LogRepositoryImpl implements LogRepository {
// private logDatasource: LogDatasource;
constructor(private readonly logDatasource: LogDatasource) {}
async saveLog(log: LogEntity): Promise<void> {
r... | 3 |
Cooleliel/immo-mobile-project | 3b62a6e | src/styles/baseStyles.ts | TypeScript | www.github.com/Cooleliel/immo-mobile-project/tree/main/src/styles/baseStyles.ts | https://raw.githubusercontent.com/Cooleliel/immo-mobile-project/3b62a6e/src/styles/baseStyles.ts | Cooleliel/immo-mobile-project 3b62a6e src/styles/baseStyles.ts | true | 200 | 1,179 | import { StyleSheet } from "react-native";
import { COLORS, FONTS, LAYOUT } from "../constants/themes";
export const baseStyles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: COLORS.gray[50],
},
containerBorderTopRadius: {
backgroundColor: COLORS.background,
bo... | 0 |
aparx/neo-strathub | fbf591f | packages/utils/src/string/pascalCase.ts | TypeScript | www.github.com/aparx/neo-strathub/tree/main/packages/utils/src/string/pascalCase.ts | https://raw.githubusercontent.com/aparx/neo-strathub/fbf591f/packages/utils/src/string/pascalCase.ts | aparx/neo-strathub fbf591f packages/utils/src/string/pascalCase.ts | true | 200 | 698 | import { Nullish } from "../generic";
type PascalCaseReturn<T> = null extends T
? null
: undefined extends T
? undefined
: T extends string
? string
: never;
export function pascalCase<T extends Nullish<string>>(
value: T,
): PascalCaseReturn<T> {
if (!value?.length) return value as any;
... | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.