Git Product home page Git Product logo

e-shoku-api's Introduction


Hi there 👋

e-shoku-api's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar rikuya124 avatar ryoheinan avatar

Stargazers

 avatar

Watchers

 avatar

e-shoku-api's Issues

`related_user`に認証を入れる

概要

related_userは一般非公開のルームも表示可能なパラメータであるので、認証を入れて本人のみが呼び出すことのできるように変更する。

CSRF対策の実装

すでにcsrf tokenがcookieにセットされているっぽい(Auth0のおかげ?)ので、正しく動いているのかについて要調査。

部分一致検索APIの実装

概要

RoomAPIViewクラスに部分一致検索ができるような処理を実装する。
http://localhost:8000/api/rooms?q=helloのように。

インデックスでデータ検索を高速化する

概要

インデックスを使うと高速で検索ができるので、データ量が増えてきたらインデックスを導入して高速化する。
→現状データ量が少なすぎるので恩恵があまり得られない。

データベース正規化を行う

概要

hostsやguestsに関しての設計等がだいぶ辛くなってきたので、正規化を行ってAPIを設計しやすくする。

created_atの値をreadonlyで返す

概要

ユーザーモデルとルームモデルに関して、created_atがexcludeになっているので、readonlyで返すように変更する。

Userモデルにdescriptionとimage_urlフィールドを追加する

概要

自己紹介欄としてdescriptionフィールド、プロフィール画像のURL情報としてimage_urlフィールドをUserモデルに追加する。

仕様

descriptionフィールド

  • 空欄可
  • 500文字以内のCharField

image_urlフィールド

  • URLフィールド
  • ドメインは正規表現で

Memo

ユニットテストも更新する必要あり。

URLで渡されたidに関してのバリデーションを行う

概要

現状、UUID形式でないidをURLで渡すと500エラーが生じて、エラー情報をJSONで返すことができていない。そこで、idに対してバリデーションを行うことでそれを防ぎ、正しいエラーハンドリングを行う必要がある。

ルーム非公開機能の実装

概要

is_private属性に応じて非公開にするかどうか設定できるようにする
また、招待コード機能について考える

Memo

code = ''.join(random.choices(
                string.ascii_uppercase + string.digits, k=6)
            )
room_info['invite_code'] = code

参加時のAPIを整備する

概要

Roomは第三者に対して書き込み権限を与えていないので、参加時やキャンセルに関するAPIを整備する。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.