Last
Last
KPCKevin Powell - Community
Created by Last on 6/27/2023 in #os-and-tools
npm install speed very slow
i used VPN and now it installs a whole lot faster compared to without using VPN. is it my ISP? how do i address the issue? do i have to contact my ISP? what will they need to do?
5 replies
KPCKevin Powell - Community
Created by Last on 6/27/2023 in #os-and-tools
npm install speed very slow
thanks! ill try on a different device first
5 replies
KPCKevin Powell - Community
Created by Last on 6/7/2023 in #front-end
How do i handle different logo sizes on a single web page with page load time in mind?
thank you very much!
6 replies
KPCKevin Powell - Community
Created by Last on 5/27/2023 in #front-end
when making a POST request, an extra key shows up in render.com logs where the BE API is deployed.
it produces an extra "authentication" key and i don't know where that is coming from. in my rails controller, i only permitted email and password, without a top level key
class Api::V1::AuthenticationController < ApplicationController
skip_before_action :authenticate_request,
only: %i[landlord_create renter_create]

def landlord_create
# signin
@landlord, @error_messages = Landlord.signin(signin_params)

if @error_messages.nil?
serialized_token = TokenSerializer.serialize_user(@landlord)
render json: { landlord: serialized_token }, status: :ok
else
render json: { errors: @error_messages }, status: :unauthorized
end
end


private

def signin_params
params.permit(:email, :password)
end
end
class Api::V1::AuthenticationController < ApplicationController
skip_before_action :authenticate_request,
only: %i[landlord_create renter_create]

def landlord_create
# signin
@landlord, @error_messages = Landlord.signin(signin_params)

if @error_messages.nil?
serialized_token = TokenSerializer.serialize_user(@landlord)
render json: { landlord: serialized_token }, status: :ok
else
render json: { errors: @error_messages }, status: :unauthorized
end
end


private

def signin_params
params.permit(:email, :password)
end
end
these are my routes
scope '/auth' do
post '/landlord', to: 'authentication#landlord_create'
post '/renter', to: 'authentication#renter_create'
end
scope '/auth' do
post '/landlord', to: 'authentication#landlord_create'
post '/renter', to: 'authentication#renter_create'
end
im lost really and i dont know what do do and how to debug this
2 replies
KPCKevin Powell - Community
Created by Last on 5/5/2023 in #os-and-tools
Building a Static Website in a Folder: Relative Paths
Hey there, thanks for taking the time to explain why builders use absolute paths starting from the web root. As someone who's still learning about web development, I'm always curious about the "why" behind things. I guess someone old and experienced in the old web and the modern way of doing things would have answers for me. But your insights have definitely shed some light on the subject. Thanks again for your help, I really appreciate it!
3 replies